Skip to content

lair_release

lair_release #6

on:
repository_dispatch:
types: [lair_release]
jobs:
build:
permissions:
contents: write
strategy:
fail-fast: true
matrix:
platform: [windows-2022, 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:
name: artifacts
path: |
target/release/lair-keystore
if-no-files-found: error
- name: View directory contents (unix)
if: matrix.platform == 'ubuntu-20.04' || matrix.platform == 'macos-11'
run: |
ls -lR
- name: View directory contents (dos)
if: matrix.platform == 'windows-2022'
run: |
tree .
- name: Upload artifacts (dos paths)
if: matrix.platform == 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: artifacts
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
with:
path: |
artifacts/lair-keystore
- name: release
uses: actions/create-release@v1
id: create_release
with:
draft: true
prerelease: false
release_name: Lair - ${{ github.event.client_payload.ref }}
tag_name: ${{ github.event.client_payload.ref }}
body_path: CHANGELOG.md
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}