Skip to content

Release

Release #2

Workflow file for this run

name: Release
on: workflow_dispatch
env:
CARGO_INCREMENTAL: 0
jobs:
build:
name: Build
strategy:
fail-fast: false
matrix:
job:
- target: x86_64-unknown-linux-musl
exe: x86_64-linux
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
exe: aarch64-linux
os: ubuntu-latest
- target: x86_64-apple-darwin
exe: x86_64-apple-darwin
os: macos-latest
- target: aarch64-apple-darwin
exe: arm64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.job.os }}
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.job.target }}
components: rust-src
- uses: actions-rs/cargo@v1
with:
use-cross: true
args: --release --target=${{ matrix.job.target }} --locked
command: build
- name: Rename build
run: cp target/${{ matrix.job.target }}/release/three-style three-style-${{ matrix.job.exe }}
- name: Archive production artifacts
uses: actions/upload-artifact@v3
with:
name: build
path: three-style-${{ matrix.job.exe }}
release:
name: Tagged Release
runs-on: ubuntu-20.04
needs: build
steps:
- uses: actions/download-artifact@v3
- name: Compress files
run: |
for file in $(find ./build -type f); do
zip "${file}.zip" "${file}"
done
- uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
prerelease: false
draft: true
files: |
./build/three-style-x86_64-apple-darwin.zip
./build/three-style-arm64-apple-darwin.zip
./build/three-style-x86_64-linux.zip
./build/three-style-aarch64-linux.zip