Skip to content

Commit 6e8280e

Browse files
committed
fix release CI
1 parent e9536f6 commit 6e8280e

1 file changed

Lines changed: 19 additions & 7 deletions

File tree

.github/workflows/publish.yml

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,47 +12,59 @@ concurrency:
1212
env:
1313
GITHUB_TOKEN: ${{ github.token }}
1414
RUST_BACKTRACE: 1
15+
RNK_RELEASE_VERSION: ${{ github.ref_name }}
1516
jobs:
17+
# strategy.matrix can't access enviroment variables, so we have a dummy step that sets it as an output,
18+
# which can be used in a matrix.
19+
prepare-version:
20+
runs-on: ubuntu-latest
21+
outputs:
22+
RNK_RELEASE_VERSION: ${{ steps.compute.outputs.RNK_RELEASE_VERSION }}
23+
steps:
24+
- name: Compute outputs
25+
id: compute
26+
run: |
27+
echo "RNK_RELEASE_VERSION=${{ env.RNK_RELEASE_VERSION }}" >> $GITHUB_OUTPUT
28+
1629
release:
1730
name: Release - ${{ matrix.platform.os_name }}
18-
env:
19-
RNK_RELEASE_VERSION: ${{ github.ref_name }}
31+
needs: prepare-version
2032
strategy:
2133
matrix:
2234
platform:
2335
- os_name: Linux-x86_64
2436
os: ubuntu-latest
2537
target: x86_64-unknown-linux-musl
2638
bin: rnk
27-
name: rnk-x86_64-unknown-linux-musl-${{RNK_RELEASE_VERSION}}.tar.gz
39+
name: rnk-x86_64-unknown-linux-musl-${{ needs.compute.outputs.RNK_RELEASE_VERSION}}.tar.gz
2840
cargo_command: cargo
2941

3042
- os_name: Linux-aarch64
3143
os: ubuntu-24.04-arm
3244
target: aarch64-unknown-linux-musl
3345
bin: rnk
34-
name: rnk-aarch64-unknown-linux-musl-${{RNK_RELEASE_VERSION}}.tar.gz
46+
name: rnk-aarch64-unknown-linux-musl-${{ needs.compute.outputs.RNK_RELEASE_VERSION}}.tar.gz
3547
cargo_command: cargo
3648

3749
- os_name: Windows-x86_64
3850
os: windows-latest
3951
target: x86_64-pc-windows-msvc
4052
bin: rnk.exe
41-
name: rnk-x86_64-pc-windows-msvc-${{RNK_RELEASE_VERSION}}.zip
53+
name: rnk-x86_64-pc-windows-msvc-${{ needs.compute.outputs.RNK_RELEASE_VERSION}}.zip
4254
cargo_command: cargo
4355

4456
- os_name: macOS-x86_64
4557
os: macOS-latest
4658
target: x86_64-apple-darwin
4759
bin: rnk
48-
name: rnk-x86_64-apple-darwin-${{RNK_RELEASE_VERSION}}.tar.gz
60+
name: rnk-x86_64-apple-darwin-${{ needs.compute.outputs.RNK_RELEASE_VERSION}}.tar.gz
4961
cargo_command: cargo
5062

5163
- os_name: macOS-aarch64
5264
os: macOS-latest
5365
target: aarch64-apple-darwin
5466
bin: rnk
55-
name: rnk-aarch64-apple-darwin-${{RNK_RELEASE_VERSION}}.tar.gz
67+
name: rnk-aarch64-apple-darwin-${{ needs.compute.outputs.RNK_RELEASE_VERSION}}.tar.gz
5668
cargo_command: cargo
5769

5870
runs-on: ${{ matrix.platform.os }}

0 commit comments

Comments
 (0)