Skip to content

Test build using push #17

Test build using push

Test build using push #17

Workflow file for this run

---
name: Build
on: push
permissions:
id-token: write
attestations: write
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}
cancel-in-progress: true
env:
COLUMNS: 120
jobs:
cargo-build:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
runs-on: ${{ matrix.os }}
env:
ARCHIVE_FILENAME: >-
hanko-${{ github.ref_name }}-${{ matrix.target }}.${{ startsWith(matrix.os, 'windows') && 'zip' || 'tar.gz' }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: "${{ matrix.target }}"
- uses: Swatinem/rust-cache@v2
- name: Print versions
shell: bash
run: |
gcc --version || true
rustup -V
rustup toolchain list
rustup default
cargo -V
rustc -V
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --locked --target ${{ matrix.target }}
- name: Create Release Tar Archive
run: >-
tar -czvf "${ARCHIVE_FILENAME}"
-C target/${{ matrix.target }}/release
hanko
shell: bash
if: ${{ !startsWith(matrix.os, 'windows') }}
- name: Create Release Zip Archive
run: >-
7z a "${ARCHIVE_FILENAME}"
./target/${{ matrix.target }}/release/hanko.exe
shell: bash
if: ${{ startsWith(matrix.os, 'windows') }}
- name: Attest Build Provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{ env.ARCHIVE_FILENAME }}
- name: Upload Release Archive
run: >-
gh release upload "${GITHUB_REF#refs/tags/}"
"${ARCHIVE_FILENAME}"
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}