-
-
Notifications
You must be signed in to change notification settings - Fork 208
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
Automate releases using GitHub Actions #1090
Comments
fwiw, input-wacom recently switched to doing that, in case you need an example to get ideas from. |
@GeorgesStavracas regarding the automatic generation of translations, if every single change will be going through a PR, one option would probably be to create another action that checks if any of the files mentioned in Now there are two options:
The second option is definitely easier for contributors, but it would add a lot of extra unnecessary "update the translation" commits. I'm not sure if that's really desired. But there's also another option - the release action can automatically update the translations, commit them and force push them to the release tag. This seems like a great approach, though I'm not sure if force pushing a commit to an existing tag on GitHub is possible. I'll need to play around with GitHub and branch protection rules and try it out. |
I did some experimentation and yes, it is absolutely possible to run an action when a tag is pushed and then add a commit to that existing tag. The only issue is that all developers will have to run So the choice is probably between three workflows:
Which of those would be preferred? |
I think what you outlined at (3) is what I had in mind when opening this issue. What I wanted to do is some sort of manual action where I'd input:
And the action would do essentially everything outlined in RELEASE_HOWTO.md. |
Hmm, I don't think there is any way to interactively provide inputs to a GitHub action. Perhaps there could be a releases.yaml/toml/json/whatever file that triggers a release when someone commits to it? |
Oh, wait, you can actually provide inputs to an action: https://github.blog/changelog/2020-07-06-github-actions-manual-triggers-with-workflow_dispatch/ However, you can't provide a multiline string to it https://github.com/orgs/community/discussions/12882 So I'm not sure if it'll be a good fit for changelogs, unless you're fine with using this workaround |
Nah, it's fine to update the NEWS file before running the action :) |
Oops, I didn't see that the repo already has a NEWS file. I'll try to work on this issue then! |
The RELEASE_HOWTO file mentions building the documentation (although it lists the old docbook meson flag instead of the new one). Is this step still necessary or does the |
I think that's outdated, |
@GeorgesStavracas another question: The version and the changelog can be taken from the NEWS file automatically with some regex. Should I also use it to automatically determine if the release is a pre-release? (Since this project uses odd numbers in minor versions to denote pre-releases) |
I think I'd prefer if the version and pre-release checks were manual. I've made mistakes in the NEWS file in the past, it would be disappointing if that ends up messing up releases if it ever happens again. Not sure if that's possible, but it would be great if the action could check if the release version is strictly bigger than the previous release of the branch. So e.g. on the (I'm very hype about this! Looking forward to see what you're cooking up there.) |
Alright, I'll probably make it so that those values are automatically determined by default but you can also specify them when running the action to override the default values. At this point I managed to automate most of the release process, but I'm not sure what to do with the SECURITY file and the bug report template. It seems like updating them requires the knowledge of what versions are no longer supported. Is this something that can be automatically determined or should I leave those files to be updated manually? |
Let's limit the scope for just generating the release for now. Updating the SECURITY file is such a minuscule effort that it can be automated later, if necessary. I also just thought of something: do you think it would be possible to add a "Dry run" option to the action that runs the the action but doesn't actually do anything, and just prints what it was going to do? Dry runs are super useful to make sure things will work ahead of time. |
Sure, that would be possible to add, though I'm not really sure what step of the release process this would be useful for - the compilation of the code is already checked by CI on each commit and the rest is basically just updating some files and creating the release. The only thing that this can probably be useful for is the NEWS file parsing - I can add a flag that skips all of the other steps and just prints the extracted release information, if you want that |
Sounds good! |
What about updating the version in the |
The version in meson.build is updated manually after the release, I don't think the action will have to do anything with it. At most, if you want to go fancy, the action could check if the action release version is equal to meson release version? |
That'll mean that there will be three separate sources to extract the version, which just adds unnecessary complexity, so I probably just won't touch meson.build then. |
Fixed by #1454 |
Currently there still is a fair amount of manual work to do in order to get a release out. It's documented in the RELEASE_HOWTO.md file. Ideally, the most of the release process would be automated, necessitating only a tag to kick off a full release.
To do this, we need to satisfy some preconditions:
main
branch must always correctly runmeson dist
(ci: Exercise creating dist tarball #1089)main
must be entirely blocked - even for maintainersThe text was updated successfully, but these errors were encountered: