Skip to content
This repository has been archived by the owner on Jun 8, 2024. It is now read-only.

0.2.10

0.2.10 #17

Workflow file for this run

# Based on typst's release action:
# https://github.com/typst/typst/blob/main/.github/workflows/release.yml
name: Build Release Binaries
on:
release:
types: [created]
jobs:
build-release:
name: release ${{ matrix.target }}
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
cross: true
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
cross: true
- target: armv7-unknown-linux-musleabi
os: ubuntu-latest
cross: true
- target: x86_64-apple-darwin
os: macos-latest
cross: false
- target: aarch64-apple-darwin
os: macos-latest
cross: false
- target: x86_64-pc-windows-msvc
os: windows-latest
cross: false
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- name: Run Cross
if: ${{ matrix.cross}}
run: |
cargo install cross --git https://github.com/cross-rs/cross.git
cross build --release --target ${{ matrix.target }}
- name: Run Cargo
if: ${{ !matrix.cross }}
run: cargo build --release --target ${{ matrix.target }}
- name: create artifact directory
shell: bash
run: |
directory=typstfmt-${{ matrix.target }}
mkdir $directory
cp README.md $directory
if [ -f target/${{ matrix.target }}/release/typstfmt.exe ]; then
cp target/${{ matrix.target }}/release/typstfmt.exe $directory
7z a -r $directory.zip $directory
else
cp target/${{ matrix.target }}/release/typstfmt $directory
tar cJf $directory.tar.xz $directory
fi
- uses: ncipollo/release-action@v1
with:
artifacts: "typstfmt-${{ matrix.target }}.*"
allowUpdates: true