Skip to content

ci: automate releases with release PRs - #41

Open
vados-cosmonic wants to merge 1 commit into
bytecodealliance:mainfrom
vados-cosmonic:ci/release-prs
Open

vados-cosmonic wants to merge 1 commit into
bytecodealliance:mainfrom
vados-cosmonic:ci/release-prs

Conversation

@vados-cosmonic

Copy link
Copy Markdown
Contributor

Adds a release-PR flow (like jco and ComponentizeJS), building on the existing release workflow:

  • Create release PR: run it from the Actions tab with a version. It bumps Cargo.toml/Cargo.lock, npm/weval and the downloader TAG, updates CHANGELOG.md with git-cliff, and opens a PR.
  • Tag release: when that PR is merged, tags the merge commit and starts Release on the tag.
  • Release: same builds and GitHub release as before. Tagged releases now also publish to crates.io and npm with trusted publishing (a dry run outside this repo). Actions are pinned, permissions scoped, and -rc tags are marked as prereleases.

Setup needed:

  • npm and crates.io trusted publishers for release.yml
  • Allow GitHub Actions to create PRs, or add a RELEASE_PAT secret

Tested end to end on a fork, publishing as a dry run.

Covers #33.

Add a release-PR flow, building on the existing release workflow:

- create-release-pr.yml bumps the version (Cargo.toml, Cargo.lock,
  npm/weval and the downloader TAG), updates CHANGELOG.md with
  git-cliff, and opens a release PR.
- tag-release.yml tags the merged release PR and starts release.yml on
  the tag.
- release.yml publishes tagged releases to crates.io and npm with
  trusted publishing (a dry run outside bytecodealliance/weval), pins
  its actions and scopes its permissions. The github-release action
  marks `-rc`-style tags as prereleases.

Signed-off-by: Victor Adossi <vadossi@cosmonic.com>
@vados-cosmonic

Copy link
Copy Markdown
Contributor Author

BTW, I've enabled trusted publishing on the NPM side (not the Cargo side, since I'm not on there as a maintainer), so if we make a 0.5.2-rc.0 release we should be able to get a low-stakes release out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant