Skip to content

v0.2.8

v0.2.8 #33

Workflow file for this run

name: Release axkeystore
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build:
name: Build ${{ matrix.asset }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
# ---------- Linux ----------
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
binary: axkeystore
asset: axkeystore-linux-x86_64
# ---------- Windows ----------
- os: windows-latest
target: x86_64-pc-windows-msvc
binary: axkeystore.exe
asset: axkeystore-windows-x86_64.exe
# ---------- macOS Apple Silicon ----------
- os: macos-latest
target: aarch64-apple-darwin
binary: axkeystore
asset: axkeystore-macos-aarch64
# ---------- macOS Intel ----------
- os: macos-latest
target: x86_64-apple-darwin
binary: axkeystore
asset: axkeystore-macos-x86_64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Cargo cache
uses: Swatinem/rust-cache@v2
- name: Build release
run: cargo build --release --target ${{ matrix.target }}
- name: Strip binary (Linux & macOS)
if: runner.os != 'Windows'
run: strip target/${{ matrix.target }}/release/${{ matrix.binary }}
- name: Rename binary
run: cp target/${{ matrix.target }}/release/${{ matrix.binary }} target/${{ matrix.target }}/release/${{ matrix.asset }}
- name: Generate SHA256 (non-Windows)
if: runner.os != 'Windows'
run: |
cd target/${{ matrix.target }}/release
shasum -a 256 ${{ matrix.asset }} > ${{ matrix.asset }}.sha256
- name: Generate SHA256 (Windows)
if: runner.os == 'Windows'
run: |
cd target/${{ matrix.target }}/release
certutil -hashfile "${{ matrix.asset }}" SHA256 | findstr /v /c:"hash" /c:"CertUtil" > "${{ matrix.asset }}.sha256"
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.asset }}
path: |
target/${{ matrix.target }}/release/${{ matrix.asset }}
target/${{ matrix.target }}/release/${{ matrix.asset }}.sha256
release:
name: Publish GitHub Release
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
files: dist/**/*