Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a GitHub Actions workflow for publishing a release (#691)
In #689, a GitHub Actions workflow was added for the first stage of the release process - preparing the release PR. Now, another workflow has been added for the second stage of the release process - publishing to https://crates.io and creating the GitHub Release. This workflow makes use of the `cargo-release` tool, which calculates the crate dependency graph for us, so we don't need to hardcode a crate publish ordering: https://github.com/crate-ci/cargo-release/blob/master/docs/reference.md This tool also skips any already-published crates, so if say a release failed halfway through publishing to crates.io, the job could be retriggered and would successfully resume publishing. The new workflow does however perform a single check to see if the GitHub Release already exists, to prevent accidentally re-running an already completed successfully release (which might move the git tag): https://cli.github.com/manual/gh_release_view Credentials are configured via the `CARGO_REGISTRY_TOKEN` env var, which has been set to the scoped crates.io API token of a service account. That service account has already been added to the `libcnb*` and `libherokbuildpack` crates: https://doc.rust-lang.org/cargo/reference/config.html#credentials https://crates.io/users/heroku-languages-release-bot heroku/languages-team#146 The awk-based changelog extraction technique was inspired by: https://stackoverflow.com/questions/38972736/how-to-print-lines-between-two-patterns-inclusive-or-exclusive-in-sed-awk-or Closes #595. GUS-W-14177169.
- Loading branch information