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

more release automation #2796

Merged
merged 3 commits into from
Apr 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# To trigger this:
# - go to Actions > Publish
# - click the Run Workflow dropdown in the top-right
name: Publish
on: workflow_dispatch
# This is triggered after the Release workflow successfully completes its run
on:
workflow_run:
workflows:
- Release
types:
- completed
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
jobs:
cargo-publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
Expand Down
6 changes: 5 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ cargo release [patch|minor] --no-publish --execute
This does the following:

- Bump the version.
- Turn the `Unreleased` section of the changelog into the section for the version being published.
- Turn the `Unreleased` section of the changelog into the section for the version being released.
- Update the table of contents of the changelog using `doctoc`.
- Tag (`git tag`) the HEAD commit
- Push (`git push`) to GitHub
Expand All @@ -573,6 +573,10 @@ The `patch` and `minor` refer to semver concepts:
- `patch` would bump __v0.68.1__ to __v0.68.2__
- `minor` would bump __v0.68.2__ to __v0.69.0__

> NOTE:
> We use the `--no-publish` so that the crates are only published after the release is complete.
> This is automatic, provided the release CI job is successful.

### Create a new release on Github

The release is automated with the help of `.github/workflows/release.yml`,
Expand Down
Loading