Skip to content

Conversation

sandhose
Copy link
Member

@sandhose sandhose commented Jan 20, 2025

The intended workflow is as follows:

  • release-branch.yaml:
    • creates a new RC tag for the next pre-release
    • pushed to the main branch
    • and pushed to a release/vX.Y branch
    • creates a vX.Y branch in Localazy. Upload and download actions were adapted to use that branch
  • release-bump.yaml bumps a version on a release branch
    • if it has RC set it will do a new RC
    • if not it will do a stable release (next patch version if we were not on an RC yet)
    • if it has Merge back set, it will open a PR release/vX.Y -> main
  • the git tag creates the usual docker image + GitHub draft release through the build.yaml workflow

One flaw of this workflow, is that the docker latest tag is updated every time we publish a 'stable' release, so if we decide to bump on an older release branch, it will set that as the latest release tag

For future reference if we want to fix that
> git tag -l 'v*' | xargs npx semver --preid rc
0.0.0-test.0
0.0.0-test.1
0.1.0
0.2.0
0.3.0
0.4.0
0.4.1
0.5.0-rc.0
0.5.0-rc.1
0.5.0-rc.2
0.5.0
0.6.0
0.6.1
0.7.0
0.8.0-rc.0
0.8.0-rc.1
0.8.0
0.9.0-rc.0
0.9.0-rc.1
0.9.0
0.10.0-rc.0
0.10.0
0.11.0-rc.0
0.11.0
0.12.0-rc.0
0.12.0-rc.1
0.12.0

Copy link

cloudflare-workers-and-pages bot commented Jan 20, 2025

Deploying matrix-authentication-service-docs with  Cloudflare Pages  Cloudflare Pages

Latest commit: 381266a
Status: ✅  Deploy successful!
Preview URL: https://9549d97e.matrix-authentication-service-docs.pages.dev
Branch Preview URL: https://quenting-release-branches.matrix-authentication-service-docs.pages.dev

View logs

@sandhose sandhose added A-CI Related to continuous integration/GitHub Actions T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks. labels Jan 20, 2025
@sandhose sandhose marked this pull request as ready for review January 20, 2025 16:57
@sandhose sandhose requested a review from reivilibre January 20, 2025 17:01
Copy link
Contributor

@reivilibre reivilibre left a comment

Choose a reason for hiding this comment

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

This looks good.

Just a perfectionist point (though maybe there's a worthwhile speedup in there).

Maybe also: would it be worth having a dev doc page on how to build a release, even just bullet points of 'go and run X workflow, then merge the PR, then do this...'?

Comment on lines +25 to +28
- name: Install Rust toolchain
run: |
rustup toolchain install stable
rustup default stable
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this is idiomatic for GHA but it feels suboptimal that we have to install Rust imperatively/slowly, particularly for just ... running cargo metadata.
When I used to self-host Drone/Woodpecker CI, this would have been done by running the command on a Rust container image that already had it installed.

Separately but also along the same lines: how intensive is cargo metadata — does it need to fetch all dependency crates? That would seem suboptimal just for reading a version.
Maybe there's a TOML version of jq that we could use to just pull it out of mas-cli/Cargo.toml? :-), or some toml2json | jq?

Copy link
Member Author

Choose a reason for hiding this comment

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

That's fair, although the current release process took about 30s, including the rustup install, so I'm not too concerned about this slowing down the release :)


- name: Extract the current version
id: current
run: echo "version=$(cargo metadata --format-version 1 | jq -r '.packages[] | select(.name == "mas-cli") | .version')" >> "$GITHUB_OUTPUT"
Copy link
Contributor

Choose a reason for hiding this comment

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

(ditto)

@sandhose sandhose force-pushed the quenting/release-branches branch from fb6db37 to 381266a Compare January 22, 2025 16:07
@sandhose sandhose merged commit 1c6a9cc into main Jan 22, 2025
21 checks passed
@sandhose sandhose deleted the quenting/release-branches branch January 22, 2025 16:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Related to continuous integration/GitHub Actions T-Task Refactoring, removal, replacement, enabling or disabling functionality, other engineering tasks.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants