-
-
Notifications
You must be signed in to change notification settings - Fork 2
ci: add release-plz for crates.io publishing #69
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
Changes from all commits
b3c0442
83e0a6c
a5d606d
a699eb5
d9dcd54
cc096db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| name: release-plz | ||
|
|
||
| on: | ||
| push: | ||
| branches: [main] | ||
|
|
||
| jobs: | ||
| release-plz-release: | ||
| name: Release-plz release | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| # persist-credentials required for pushing signed tags via git CLI | ||
| persist-credentials: true | ||
| - uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 | ||
| with: | ||
| install: true | ||
|
||
| - name: Run release-plz | ||
| uses: release-plz/action@52440b50d383aa252927de395c8b2c1e0a9cf8e9 # v0.5 | ||
| with: | ||
| command: release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
|
||
| release-plz-pr: | ||
| name: Release-plz PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| concurrency: | ||
| group: release-plz-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| steps: | ||
|
||
| - name: Checkout repository | ||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||
| with: | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
||
| - uses: jdx/mise-action@6d1e696aa24c1aa1bcc1adea0212707c71ab78a8 # v3.6.1 | ||
| with: | ||
|
||
| install: true | ||
| - name: Run release-plz | ||
| uses: release-plz/action@52440b50d383aa252927de395c8b2c1e0a9cf8e9 # v0.5 | ||
| with: | ||
| command: release-pr | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| [workspace] | ||
| # release-plz handles crates.io publish + git tags | ||
| # cargo-dist handles GitHub Releases (triggered by the tag) | ||
| git_release_enable = false | ||
| git_tag_enable = true | ||
| publish = true | ||
| semver_check = true | ||
| changelog_config = "cliff.toml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions should be pinned to full commit SHA hashes with version comments for security, following the repository's established pattern. The
dtolnay/rust-toolchain@stablereference should be pinned to a specific commit SHA. Based on the CI workflow, consider usingdtolnay/rust-toolchain@0dd4a6d07aedb0ef7f65e79f3e229a6c102ae2e0 # 1.91.0or update to a newer pinned version if needed.