Skip to content
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

Release Automation #289

Merged
merged 53 commits into from
Nov 19, 2022
Merged

Conversation

StarWitch
Copy link
Member

@StarWitch StarWitch commented Apr 30, 2021

A lot of trial-and-error went into this, but here it is.

General steps in this:

  1. Create a v*.*.*[-alpha/-rc/-etc] branch, wait for the Release Builds job to finish, download the artifacts on the job page in Actions (near the bottom of the page) (or use the API), as well as the build logs, verify them.
  2. If everything looks good, push to the tag (i.e refs/tags/v*.*.*[-alpha/-rc/-etc]).
  3. It will build the files AGAIN, and you can double-check them there too.
  4. Upload them as usual to the official tag release page. (At least until the Publishing pipeline is also reviewed/merged, split off from this one.)

Most of what's present is already done in the CI pipeline, but using different machine files to release a more optimized build, as well as extra steps for packaging. There's a little bit of duplication between CI and Release, but it's easier to read and maintain than trying to write a bunch of conditionals inside a single .yaml file to do both CI and release builds.

I've also made it so it produces .sig and .sha256 files for each one of the releases, and added some Python scripting to help that along.

Here's what it looks like in action: https://github.com/StarWitch/taisei/releases/tag/v1.3.50 (ignore the v1.3.50, it's just for testing)

Post-Merge Steps

  1. Adding a GPG_PRIVATE_KEY and GPG_PASSPHRASE to Settings -> Secrets inside the main Taisei project so the pipeline can generate .sig files. These files are hidden in normal pipeline use and I've made sure to fork our version of ghaction-import-gpg at taisei-project/ghaction-import-gpg.

@StarWitch StarWitch added build ci for continuous integration labels Apr 30, 2021
@StarWitch StarWitch added this to the v1.4 milestone Apr 30, 2021
@StarWitch StarWitch force-pushed the release-automation branch 3 times, most recently from 8513b03 to 981f402 Compare May 7, 2021 16:29
@StarWitch StarWitch force-pushed the release-automation branch 2 times, most recently from abfc5fa to 7feaf9a Compare May 16, 2021 16:37
@StarWitch StarWitch marked this pull request as ready for review May 16, 2021 16:38
@StarWitch StarWitch force-pushed the release-automation branch 2 times, most recently from 34fcf48 to 44df244 Compare May 25, 2021 21:00
Copy link
Member

@Akaricchi Akaricchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a thorough review, just addressing what sticks out the most for now.

.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/publish.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@StarWitch StarWitch force-pushed the release-automation branch 3 times, most recently from 3f92114 to 8ef59c1 Compare May 30, 2021 20:23
@StarWitch StarWitch requested a review from Akaricchi May 30, 2021 20:24
@StarWitch
Copy link
Member Author

Spent the afternoon refactoring this. sha256sum and sig files are now generated by the new releasefiles.py script which meson now calls directly with release_files provided as an argument. I also found a better releasing script (the one I linked before) which allows wildcards, which is much simpler to use. I also forked the GPG action like you suggested, since that's safer/easier. Let me know if this is in the right direction.

@StarWitch StarWitch force-pushed the release-automation branch from 308de4c to e2065ca Compare June 3, 2021 16:53
@StarWitch StarWitch force-pushed the release-automation branch from 2d7ea1a to a6c97c0 Compare June 18, 2021 16:49
@StarWitch StarWitch force-pushed the release-automation branch from 7bf7ab5 to 7701946 Compare July 2, 2021 23:32
@StarWitch StarWitch force-pushed the release-automation branch from 7701946 to 258ceea Compare August 5, 2021 01:50
@StarWitch StarWitch force-pushed the release-automation branch 2 times, most recently from d4bc2f6 to 4093180 Compare September 2, 2021 20:50
@StarWitch StarWitch force-pushed the release-automation branch 2 times, most recently from 39b1a83 to 21f582c Compare October 15, 2022 15:21
@StarWitch
Copy link
Member Author

A bunch of changes since I last updated this PR.

  1. Updated all of the action versions to get rid of as many deprecation warnings as possible.
  2. Updated to ubuntu-20.04 since ubuntu-18.04 is being removed from GitHub Actions in six months. We could roll our own but it was deemed not worth it.
  3. Updated macos-11 to macos-12.
  4. Allow specifying of an arbitrary commit through workflow_dispatch.
  5. Added the Linux library linker checking script to the Linux stage.
  6. Some minor optimizations.

@StarWitch StarWitch requested a review from Akaricchi October 15, 2022 15:35
Copy link
Member

@Akaricchi Akaricchi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good to land modulo comments. I hope this is my last review here. We can keep improving it for a long time, but this PR has been in the oven for way too long already. Great work!

switch/crossfile.sh Outdated Show resolved Hide resolved
scripts/meson.build Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
.github/workflows/release.yml Outdated Show resolved Hide resolved
@StarWitch
Copy link
Member Author

Remaining comments resolved.

There's currently an issue with macOS builds due to this issue, but the fix for that was merged and it should be deployed to the runner pool soon, which shouldn't require editing the workflow at all.

@StarWitch StarWitch requested a review from Akaricchi November 19, 2022 16:27
@Akaricchi Akaricchi merged commit b27f0f0 into taisei-project:master Nov 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build ci for continuous integration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants