lair-binaries release 0.4.0 #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'release-lair-binaries' | |
on: | |
push: | |
tags: | |
- 'lair-binaries-v*' | |
jobs: | |
publish-lair-binaries: | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: [windows-2019, macos-11, ubuntu-20.04] | |
permissions: | |
contents: write | |
runs-on: ${{ matrix.platform }} | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
# Checks out a copy of your repository on the ubuntu-latest machine | |
- uses: actions/checkout@v3 | |
- id: create-release | |
uses: ncipollo/release-action@v1 | |
with: | |
body: 'Lair binaries for Linux/Windows/macOS.' | |
prerelease: true | |
skipIfReleaseExists: true | |
- name: install Rust stable | |
uses: actions-rs/toolchain@v1 | |
with: | |
override: true | |
toolchain: stable | |
- name: install Go stable | |
uses: actions/setup-go@v4 | |
with: | |
go-version: 'stable' | |
- name: setup binaries (Windows only) | |
if: matrix.platform == 'windows-2019' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cargo install --version 0.4.0 lair_keystore | |
$LkPath = Get-Command lair-keystore | Select-Object -ExpandProperty Definition | |
Copy-Item $LkPath -Destination "lair-keystore-v0.4.0-x86_64-pc-windows-msvc.exe" | |
gh release upload "$($env:GITHUB_REF -replace "refs/tags/")" "lair-keystore-v0.4.0-x86_64-pc-windows-msvc.exe" | |
- name: setup binaries (macos only) | |
if: matrix.platform == 'macos-11' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cargo install --version 0.4.0 lair_keystore | |
LAIR_PATH=$(which lair-keystore) | |
cp $LAIR_PATH lair-keystore-v0.4.0-x86_64-apple-darwin | |
gh release upload "${GITHUB_REF#refs/tags/}" "lair-keystore-v0.4.0-x86_64-apple-darwin" | |
- name: setup binaries (ubuntu only) | |
if: matrix.platform == 'ubuntu-20.04' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
cargo install --version 0.4.0 lair_keystore | |
LAIR_PATH=$(which lair-keystore) | |
cp $LAIR_PATH lair-keystore-v0.4.0-x86_64-unknown-linux-gnu | |
gh release upload "${GITHUB_REF#refs/tags/}" "lair-keystore-v0.4.0-x86_64-unknown-linux-gnu" |