-
Notifications
You must be signed in to change notification settings - Fork 154
chore: revive and improve release automation #2266
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 12 commits
084c879
c0aa24f
c4fa7c0
2292bc1
85586da
50273e3
a3fb5a9
423e826
803b57e
8fa2fd8
5d31a03
ef9e20f
f8f80dd
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,51 @@ | ||
| name: Release Checker | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| paths: | ||
| - "**/Cargo.toml" | ||
| types: [ opened, synchronize, reopened, labeled, unlabeled ] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| release-check: | ||
| uses: ipdxco/unified-github-workflows/.github/workflows/release-check.yml@v1.0 | ||
| with: | ||
| sources: | | ||
| [ | ||
| "fvm/Cargo.toml", | ||
| "testing/integration/Cargo.toml", | ||
| "ipld/amt/Cargo.toml", | ||
| "ipld/bitfield/Cargo.toml", | ||
| "ipld/blockstore/Cargo.toml", | ||
| "ipld/car/Cargo.toml", | ||
| "ipld/encoding/Cargo.toml", | ||
| "ipld/hamt/Cargo.toml", | ||
| "ipld/kamt/Cargo.toml", | ||
| "sdk/Cargo.toml", | ||
| "shared/Cargo.toml" | ||
| ] | ||
| separator: "@" | ||
| cargo-publish: | ||
| needs: [release-check] | ||
| if: needs.release-check.outputs.json != '{}' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Install required packages | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev | ||
| - name: Dry-run publish | ||
| run: | | ||
| # Use cargo publish --workspace --dry-run to verify the entire workspace at once. | ||
| # This correctly handles interdependent crates which a matrix-based approach misses. | ||
| cargo publish --workspace --dry-run | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| name: Releaser | ||
|
|
||
| on: | ||
| push: | ||
| paths: | ||
| - "**/Cargo.toml" | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: write | ||
| id-token: write | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should verify that this workflow is listed as a trusted publisher in crates.io.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd look but I can't find the crate settings even though I should be in the team that has publish access, crates.io teams is janky, maybe @hanabi1224 || @LesnyRumcajs has a clue
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think:
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I did the same setup for those as well - my bad for missing those previously. |
||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.sha }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| releaser: | ||
| uses: ipdxco/unified-github-workflows/.github/workflows/releaser.yml@v1.0 | ||
| with: | ||
| sources: | | ||
| [ | ||
| "fvm/Cargo.toml", | ||
| "testing/integration/Cargo.toml", | ||
| "ipld/amt/Cargo.toml", | ||
| "ipld/bitfield/Cargo.toml", | ||
| "ipld/blockstore/Cargo.toml", | ||
| "ipld/car/Cargo.toml", | ||
| "ipld/encoding/Cargo.toml", | ||
| "ipld/hamt/Cargo.toml", | ||
| "ipld/kamt/Cargo.toml", | ||
| "sdk/Cargo.toml", | ||
| "shared/Cargo.toml" | ||
| ] | ||
| separator: "@" | ||
| secrets: | ||
| UCI_GITHUB_TOKEN: ${{ secrets.UCI_GITHUB_TOKEN }} | ||
|
|
||
| cargo-publish: | ||
| needs: [releaser] | ||
| if: needs.releaser.outputs.json != '{}' | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v6 | ||
| - name: Install required packages | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install --no-install-recommends --yes libhwloc-dev ocl-icd-opencl-dev | ||
|
galargh marked this conversation as resolved.
Outdated
|
||
| - name: Publish to crates.io | ||
| run: | | ||
| # Use cargo publish --workspace to publish all changed crates in the workspace. | ||
| # This handles interdependent crates correctly and only publishes those with version bumps. | ||
| cargo publish --workspace | ||



Uh oh!
There was an error while loading. Please reload this page.