-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a GitHub Action #48
Comments
What should a GitHub action do?
Where do these pre-compiled binaries come from? We will need to generate and publish them as part of a release workflow for this repository. See #78 for another issue about releasing binaries. I would like us to use mgeisler/rust-release-gh-action to do the releases — it's the release flow I'm using for all my Rust crates these days. This release workflow needs to be integrated and it needs to be extended to generate binaries. It should probably also be rewritten as a Rust binary instead (which we will execute via a Dockerfile GitHub action. So, all in all, there is a fair amount of steps to be tackled here by someone... it will involve touching several interesting technologies 😄 |
@mgeisler Could you please assign this task to me. |
Hey @trooper2013, thanks a lot for looking at this! I would love for you to start simple here: building a fully automatic publishing pipeline is complicated, but making a very simple GitHub action is not. See https://github.com/dprint/check as a good example of how to get started. The |
@trooper2013 are you still working on this? If not I can take a shot at it. |
@mgeisler If I'm understanding correctly, this action should do the following (modeled after publish.yml from Comprehensive Rust):
The user would then be able to add a job to their workflow like so: jobs:
publish:
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build translations
uses: <our new action>
with:
languages: <space-separated list of languages> Now that I'm thinking about it, maybe this belongs in a separate repo that would also include a GitHub Action to build with mdbook without translations (if that doesn't already exist). |
@carreter unfortunately I have not got to it. Please re-assign |
Hi @carreter, thanks for looking at this!
For Comprehensive Rust, we install our dependencies using action.yml. There are quite a few and it's a mix of what that specific book needs and what mdbook-i18n-helpers need. Now that I think of it: mdbook-i18n-helpers don't need any of the Gettext binaries: The other The Gettext tooling is needed around the mdbook-i18n-helper plugins: you will want to run
My thinking so far has been that this is something people should do locally when needed. But you have a point that some projects might want to instead auto-generate this in an action and commit it to their repository. That would make it super easy for someone else to start a new translation.
I think this is something that should be done by hand: you need a translator to look over the changes and it's much easier to do this when you have the diff available.
I will suggest two actions:
That should be enough to speed up the builds of most (all?) projects that use this translation infrastructure. I think that also makes the task here more self-contained: it basically becomes a question of automating binary releases. I have seen other Rust projects do this, but I haven't looked into the details of how they actually do it 😄
A separate repository might be a good idea, not super sure! Just as a heads up: there is a bit of process involved on my side if we are going to host this in the |
Sounds good. I'll work on automating binary releases for both |
We should publish our own GitHub Action to make it easy to use
mdbook-i18n-helpers
.This will move logic from the YAML file (such as
publish.yml
) to the action. The action is probably written in TypeScript (I'm not sure we can write an action in Rust?) and this will be a more comfortable language than what we can do with scripts in the YAML file.The text was updated successfully, but these errors were encountered: