Skip to content

Commit 570395c

Browse files
committed
Auto-publish release after all builds succeed
- Add publish-release job that removes draft flag once all builds complete - publish-crates now depends on publish-release (release is public before crates.io) - Use actions-rust-lang/setup-rust-toolchain@v1 in build-release (consistent with ci.yml, includes built-in caching)
1 parent 74fc736 commit 570395c

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,9 @@ jobs:
5757
- uses: actions/checkout@v6
5858

5959
- name: Install Rust toolchain
60-
run: rustup target add ${{ matrix.target }}
60+
uses: actions-rust-lang/setup-rust-toolchain@v1
61+
with:
62+
target: ${{ matrix.target }}
6163

6264
- name: Prepend Strawberry Perl to PATH (Windows)
6365
if: runner.os == 'Windows'
@@ -113,9 +115,19 @@ jobs:
113115
"${{ steps.package.outputs.archive }}" \
114116
"${{ steps.package.outputs.sha256 }}"
115117
118+
publish-release:
119+
name: Publish release
120+
needs: build-release
121+
runs-on: ubuntu-latest
122+
steps:
123+
- name: Publish release
124+
env:
125+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
126+
run: gh release edit "$GITHUB_REF_NAME" --draft=false --repo "$GITHUB_REPOSITORY"
127+
116128
publish-crates:
117129
name: Publish to crates.io
118-
needs: build-release
130+
needs: publish-release
119131
runs-on: ubuntu-latest
120132
steps:
121133
- uses: actions/checkout@v6

0 commit comments

Comments
 (0)