mirror of
https://github.com/pesde-pkg/pesde.git
synced 2025-05-04 10:33:47 +01:00
chore(actions): include full semver version including git commit SHA
This commit is contained in:
parent
957d773f91
commit
47813f226e
1 changed files with 18 additions and 5 deletions
23
.github/workflows/debug.yml
vendored
23
.github/workflows/debug.yml
vendored
|
@ -7,12 +7,21 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
get-version:
|
get-version:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
version: v${{ steps.get_version.outputs.value }}+rev.g${{ steps.trim_sha.outputs.trimmed_sha }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Get package version
|
||||||
|
uses: SebRollen/toml-action@v1.2.0
|
||||||
|
id: get_version
|
||||||
|
with:
|
||||||
|
file: Cargo.toml
|
||||||
|
field: package.version
|
||||||
|
|
||||||
- name: Trim commit SHA
|
- name: Trim commit SHA
|
||||||
id: trim_sha
|
id: trim_sha
|
||||||
run: |
|
run: |
|
||||||
commit_sha=${{ github.sha }}
|
commit_sha=${{ github.sha }}
|
||||||
echo "trimmed_sha=r${commit_sha:0:7}" | tee $GITHUB_ENV
|
echo "trimmed_sha=${commit_sha:0:7}" | tee $GITHUB_ENV
|
||||||
build:
|
build:
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
|
@ -20,22 +29,22 @@ jobs:
|
||||||
- job-name: Windows x86_64
|
- job-name: Windows x86_64
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-windows-x86_64
|
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-windows-x86_64
|
||||||
|
|
||||||
- job-name: Linux x86_64
|
- job-name: Linux x86_64
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-linux-x86_64
|
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-linux-x86_64
|
||||||
|
|
||||||
- job-name: macOS x86_64
|
- job-name: macOS x86_64
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
runs-on: macos-13
|
runs-on: macos-13
|
||||||
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-x86_64
|
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-x86_64
|
||||||
|
|
||||||
- job-name: macOS aarch64
|
- job-name: macOS aarch64
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
artifact-name: pesde-debug-${{ needs.get-version.outputs.trimmed_sha }}-macos-aarch64
|
artifact-name: pesde-debug-${{ needs.get-version.outputs.version }}-macos-aarch64
|
||||||
|
|
||||||
name: Build for ${{ matrix.job-name }}
|
name: Build for ${{ matrix.job-name }}
|
||||||
runs-on: ${{ matrix.runs-on }}
|
runs-on: ${{ matrix.runs-on }}
|
||||||
|
@ -43,15 +52,19 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Linux build dependencies
|
- name: Install Linux build dependencies
|
||||||
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
|
if: ${{ matrix.runs-on == 'ubuntu-latest' }}
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install libdbus-1-dev pkg-config
|
sudo apt-get install libdbus-1-dev pkg-config
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Compile in debug mode
|
- name: Compile in debug mode
|
||||||
run: cargo build --bins --no-default-features --features bin,patches,wally-compat --target ${{ matrix.target }} --locked
|
run: cargo build --bins --no-default-features --features bin,patches,wally-compat --target ${{ matrix.target }} --locked
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
|
|
Loading…
Add table
Reference in a new issue