Skip to content

Commit b83eb66

Browse files
fix: update release workflow to use nightly rust and enable edition2024
1 parent 63cd95b commit b83eb66

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ on:
77
release:
88
types: [published]
99

10+
env:
11+
CARGO_UNSTABLE_EDITION2024: true
12+
RUSTUP_TOOLCHAIN: nightly
13+
1014
jobs:
1115
build-and-publish:
1216
name: Build and publish
@@ -20,8 +24,15 @@ jobs:
2024
uses: actions-rs/toolchain@v1
2125
with:
2226
profile: minimal
23-
toolchain: 1.82.0 # Use at least 1.82.0 to handle icu_collections dependency
27+
toolchain: nightly
2428
override: true
29+
components: rustfmt, clippy
30+
31+
- name: Install latest Cargo
32+
run: |
33+
rustup update
34+
rustup default nightly
35+
cargo --version
2536
2637
- name: Install OpenSSL
2738
run: |
@@ -98,13 +109,22 @@ jobs:
98109

99110
steps:
100111
- uses: actions/checkout@v3
112+
with:
113+
ref: ${{ github.event.release.tag_name || github.ref }}
101114

102115
- name: Setup Rust
103116
uses: actions-rs/toolchain@v1
104117
with:
105118
profile: minimal
106-
toolchain: 1.82.0 # Use at least 1.82.0 to handle icu_collections dependency
119+
toolchain: nightly
107120
override: true
121+
components: rustfmt, clippy
122+
123+
- name: Install latest Cargo
124+
run: |
125+
rustup update
126+
rustup default nightly
127+
cargo --version
108128
109129
- name: Check MacOS architecture
110130
if: matrix.os == 'macos-latest'
@@ -152,9 +172,11 @@ jobs:
152172
name: Create GitHub Release
153173
runs-on: ubuntu-latest
154174
needs: build-binaries
155-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') # Only create release when triggered by tag push
175+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
156176
steps:
157177
- uses: actions/checkout@v3
178+
with:
179+
ref: ${{ github.event.release.tag_name || github.ref }}
158180

159181
- name: Download all artifacts
160182
uses: actions/download-artifact@v3

0 commit comments

Comments
 (0)