lair_release #9
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
on: | |
repository_dispatch: | |
types: [lair_release] | |
jobs: | |
build: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: true | |
matrix: | |
platform: [macos-11, ubuntu-20.04] | |
env: | |
MACOSX_DEPLOYMENT_TARGET: 10.13 | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- 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: install dependencies (ubuntu only) | |
if: matrix.platform == 'ubuntu-20.04' | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential libssl-dev | |
- uses: actions/checkout@v4 | |
with: | |
repository: holochain/lair | |
ref: ${{ github.event.client_payload.lair_ref }} | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release --bin lair-keystore | |
- name: Upload artifacts (unix paths) | |
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'macos-11' | |
uses: actions/upload-artifact@v3 | |
with: | |
path: target/release/lair-keystore | |
if-no-files-found: error | |
release: | |
permissions: | |
contents: write | |
strategy: | |
fail-fast: false | |
runs-on: ubuntu-latest | |
needs: | |
- build | |
steps: | |
- uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- uses: ncipollo/release-action@v1 | |
with: | |
artifacts: "artifact/lair-keystore" | |
name: Lair - ${{ github.event.client_payload.ref }} | |
body: "Lair binaries built from ${{ github.event.client_payload.ref }}" | |
tag: "lair-${{ github.event.client_payload.ref }}" | |
draft: true | |
prerelease: false | |
skipIfReleaseExists: true |