Repository navigation
Replace publish-crates workflow with release-plz #168
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
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| # Launch this workflow with the "Run workflow" button in the Actions tab of the repository. | ||
| # | ||
| # See https://github.com/github/rust-gems/blob/main/CONTRIBUTING.md#releasing-a-crate for more details. | ||
| name: Create release PR | ||
|
|
||
| permissions: | ||
| pull-requests: write | ||
| contents: write | ||
|
|
||
| on: workflow_dispatch | ||
|
|
||
| jobs: | ||
| # Create a PR with the new versions and changelog, preparing the next release. When merged to main, | ||
| # the publish-release.yaml workflow will automatically publish any Rust package versions. | ||
| create-release-pr: | ||
| name: Create release PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| concurrency: # Don't run overlapping instances of this workflow | ||
| group: release-plz-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@b8d6b54b02889ff2ae2bb82e8b57c3a8fc1683a5 # v0.5.139 | ||
| with: | ||
| command: release-pr | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| # This workflow only publishes releases for PRs created by create-release-pr.yaml | ||
| # | ||
| # Crates are published with crates.io Trusted Publishing: release-plz exchanges this workflow's | ||
| # GitHub OIDC identity for a short-lived crates.io token, so there is no `CARGO_REGISTRY_TOKEN` | ||
| # secret. Each crate's trusted publisher on crates.io must be configured with workflow | ||
| # `publish-release.yaml` and environment `crates-io`. | ||
| # | ||
| # See https://github.com/github/rust-gems/blob/main/CONTRIBUTING.md#releasing-a-crate for more details. | ||
| name: Release any unpublished crates | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| # Release any unpublished packages | ||
| release-plz-release: | ||
| name: Release-plz release | ||
| runs-on: ubuntu-latest | ||
|
bb8gh marked this conversation as resolved.
|
||
| # Gate releases behind an environment so protection rules apply, and so the OIDC claim | ||
| # matches the trusted publisher configured on crates.io. | ||
| environment: crates-io | ||
| permissions: | ||
| contents: write | ||
| id-token: write # Required to mint the crates.io OIDC token. | ||
| concurrency: # Serialize releases so runs don't race to publish the same version or tag | ||
| group: release-plz-release-${{ github.ref }} | ||
| cancel-in-progress: false | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install Rust toolchain | ||
| uses: dtolnay/rust-toolchain@6bed0761d98439e5a578e2877258200ad565ba87 # stable | ||
| - name: Run release-plz | ||
| uses: release-plz/action@b8d6b54b02889ff2ae2bb82e8b57c3a8fc1683a5 # v0.5.139 | ||
| with: | ||
| command: release | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| [workspace] | ||
| release_always = false | ||
|
|
||
| # Development-only crates that are never published. | ||
| [[package]] | ||
| name = "bpe-benchmarks" | ||
| release = false | ||
|
|
||
| [[package]] | ||
| name = "bpe-tests" | ||
| release = false | ||
|
|
||
| [[package]] | ||
| name = "casefold-benchmarks" | ||
| release = false | ||
|
|
||
| [[package]] | ||
| name = "consistent-choose-k-benchmarks" | ||
| release = false | ||
|
|
||
| [[package]] | ||
| name = "hash-sorted-map-benchmarks" | ||
| release = false |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.