Skip to content

Commit 4967a89

Browse files
Migrate to release-plz and trusted publishing
1 parent 5b9c4ec commit 4967a89

File tree

5 files changed

+66
-110
lines changed

5 files changed

+66
-110
lines changed

.github/workflows/cratesio-publish.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

.github/workflows/release-drafter.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/release-pr.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Open a release PR
2+
3+
on:
4+
workflow_dispatch: # Manual trigger only
5+
6+
jobs:
7+
# Create a PR with the new versions and changelog, preparing the next release.
8+
# A release will be automatically published when the PR is merged into master.
9+
release-pr:
10+
name: Open a release PR
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
concurrency:
16+
group: release-plz-${{ github.ref }}
17+
cancel-in-progress: false
18+
steps:
19+
- name: Checkout repository
20+
uses: actions/checkout@v5
21+
with:
22+
submodules: recursive
23+
fetch-depth: 0
24+
persist-credentials: false
25+
- name: Install Rust toolchain
26+
uses: dtolnay/rust-toolchain@stable
27+
- name: Run release-plz
28+
uses: release-plz/[email protected]
29+
with:
30+
command: release-pr
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Release-plz
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
# Release unpublished packages if the latest commit merged
10+
# a release PR into master
11+
release:
12+
name: Publish a new release to crates.io
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
id-token: write
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v5
20+
with:
21+
submodules: recursive
22+
fetch-depth: 0
23+
persist-credentials: false
24+
- name: Install Rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
- uses: rust-lang/crates-io-auth-action@v1
27+
id: auth
28+
- name: Run release-plz
29+
uses: release-plz/[email protected]
30+
with:
31+
command: release
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

.github/workflows/test-registry-token.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)