name: Release
on: [workflow_call, workflow_dispatch]
permissions:
contents: write
jobs:
release:
name: Release
strategy:
matrix:
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
target: ${{ matrix.target }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: Compress (mac)
if: matrix.os == 'macos-latest'
run: |
mv target/${{ matrix.target }}/release/bitwrought ./bitwrought-${{ matrix.target }}
zip bitwrought-${{ matrix.target }}.zip bitwrought-${{ matrix.target }} README.md
- name: Publish release
uses: softprops/action-gh-release@v1
with:
draft: true
files: bitwrought-${{ matrix.target }}.*