Skip to content

Commit 47813f2

Browse files
authored
chore(actions): include full semver version including git commit SHA
1 parent 957d773 commit 47813f2

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

.github/workflows/debug.yml

+18-5
Original file line numberDiff line numberDiff line change
@@ -7,51 +7,64 @@ on:
77
jobs:
88
get-version:
99
runs-on: ubuntu-latest
10+
outputs:
11+
version: v${{ steps.get_version.outputs.value }}+rev.g${{ steps.trim_sha.outputs.trimmed_sha }}
1012
steps:
13+
- name: Get package version
14+
uses: SebRollen/[email protected]
15+
id: get_version
16+
with:
17+
file: Cargo.toml
18+
field: package.version
19+
1120
- name: Trim commit SHA
1221
id: trim_sha
1322
run: |
1423
commit_sha=${{ github.sha }}
15-
echo "trimmed_sha=r${commit_sha:0:7}" | tee $GITHUB_ENV
24+
echo "trimmed_sha=${commit_sha:0:7}" | tee $GITHUB_ENV
1625
build:
1726
strategy:
1827
matrix:
1928
include:
2029
- job-name: Windows x86_64
2130
target: x86_64-pc-windows-msvc
2231
runs-on: windows-latest
23-
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-windows-x86_64
32+
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-windows-x86_64
2433

2534
- job-name: Linux x86_64
2635
target: x86_64-unknown-linux-gnu
2736
runs-on: ubuntu-latest
28-
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-linux-x86_64
37+
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-linux-x86_64
2938

3039
- job-name: macOS x86_64
3140
target: x86_64-apple-darwin
3241
runs-on: macos-13
33-
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-x86_64
42+
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-x86_64
3443

3544
- job-name: macOS aarch64
3645
target: aarch64-apple-darwin
3746
runs-on: macos-latest
38-
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-aarch64
47+
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-aarch64
3948

4049
name: Build for ${{ matrix.job-name }}
4150
runs-on: ${{ matrix.runs-on }}
4251
needs: get-version
4352
steps:
4453
- name: Checkout
4554
uses: actions/checkout@v4
55+
4656
- name: Install Linux build dependencies
4757
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
4858
run: |
4959
sudo apt-get update
5060
sudo apt-get install libdbus-1-dev pkg-config
61+
5162
- name: Install Rust toolchain
5263
uses: dtolnay/rust-toolchain@stable
64+
5365
- name: Compile in debug mode
5466
run: cargo build --bins --no-default-features --features bin,patches,wally-compat --target ${{ matrix.target }} --locked
67+
5568
- name: Upload artifact
5669
uses: actions/upload-artifact@v4
5770
with:

0 commit comments

Comments
 (0)