Skip to content

Commit 087a0c0

Browse files
committed
Avoid hardcoding version in deb testing workflow
1 parent b545855 commit 087a0c0

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/artifacts.yaml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ jobs:
8080
linux-deb:
8181
name: Linux (x86-64 GNU Deb)
8282
runs-on: ubuntu-22.04 # x86_64.
83+
outputs:
84+
version: ${{ steps.version.outputs.version }}
8385
steps:
8486
- uses: actions/checkout@v6
8587
with:
@@ -95,14 +97,20 @@ jobs:
9597
run: |
9698
curl -L $LINK/$CARGO_C_FILE | tar xz -C ~/.cargo/bin
9799
100+
- name: Extract version
101+
id: version
102+
run: |
103+
VERSION=$(cargo pkgid -p rustls-ffi | sed 's/.*@//')
104+
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
105+
98106
- name: Build deb
99107
run: ./debian/build.sh
100108

101109
- name: Upload deb
102110
uses: actions/upload-artifact@v7
103111
with:
104-
name: librustls_0.15.0_amd64.deb
105-
path: librustls_0.15.0_amd64.deb
112+
name: librustls_${{ steps.version.outputs.version }}_amd64.deb
113+
path: librustls_${{ steps.version.outputs.version }}_amd64.deb
106114

107115
macos-binaries:
108116
name: MacOS (Arm64 and x86_64)
@@ -281,9 +289,9 @@ jobs:
281289
- name: Download rustls-ffi deb artifact
282290
uses: actions/download-artifact@v8
283291
with:
284-
name: librustls_0.15.0_amd64.deb
292+
name: librustls_${{ needs.linux-deb.outputs.version }}_amd64.deb
285293
- name: Install deb
286-
run: sudo dpkg --install ./librustls_0.15.0_amd64.deb
294+
run: sudo dpkg --install ./librustls_${{ needs.linux-deb.outputs.version }}_amd64.deb
287295
- name: Check copyright exists
288296
run: test -f /usr/share/doc/librustls/COPYRIGHT
289297
# Dump out what pkg-config says about the rustls package.

0 commit comments

Comments
 (0)