Skip to content

chore(release): 🔖 0.4.3 #79

chore(release): 🔖 0.4.3

chore(release): 🔖 0.4.3 #79

Workflow file for this run

name: Build and Release
on:
push:
tags:
- "v*"
jobs:
# This builds and releases for Windows, MacOS, and Linux
usu-build-release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
artifact_name: perseus
asset_name: perseus-linux-amd64
- os: macos-latest
artifact_name: perseus
asset_name: perseus-macos-amd64
- os: windows-latest
artifact_name: perseus.exe
asset_name: perseus-windows-amd64
steps:
- uses: actions/checkout@v2
# Cache Cargo binaries
- uses: actions/cache@v3
id: cache
with:
path: |
~/.cargo/bin/
# The cache should be OS-specific
key: ${{ runner.os }}-cargo-bins
# Only install the binaries if the cache doesn't have them
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: cargo install bonnie rust-script
- name: Build
run: cargo build --release
working-directory: packages/perseus-cli
- name: Release binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/${{ matrix.artifact_name }}
asset_name: ${{ matrix.asset_name }}
tag: ${{ github.ref }}
body: "The below binaries/executables are for the Perseus CLI. See [CHANGELOG.md](./CHANGELOG.md) for details of the changes in this version."
# This builds and releases for musl
musl-build-release:
runs-on: ubuntu-latest # We cross-compile from Ubuntu
steps:
- uses: actions/checkout@v2
# Cache Cargo binaries
- uses: actions/cache@v3
id: cache
with:
path: |
~/.cargo/bin/
# The cache should be OS-specific
key: ${{ runner.os }}-cargo-bins
# Only install the binaries if the cache doesn't have them
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: cargo install bonnie rust-script
- run: sudo apt install musl-tools
- name: Install musl toolchain
run: rustup target add x86_64-unknown-linux-musl
- name: Prepare OpenSSL for cross-compilation
run: bash scripts/build_openssl_musl.sh
- name: Build
run: cargo build --release --target x86_64-unknown-linux-musl
working-directory: packages/perseus-cli
- name: Release binary
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/x86_64-unknown-linux-musl/release/perseus
asset_name: perseus-musl-amd64
tag: ${{ github.ref }}
body: "The above binaries/executables are for the Perseus CLI. See [CHANGELOG.md](./CHANGELOG.md) for details of the changes in this version."