Skip to content

Switch to [email protected] (#49)

Switch to [email protected] (#49) #102

Workflow file for this run

name: release
on:
push:
branches:
- main
paths-ignore:
- "README.md"
- "LICENSE"
tags:
- "v*.*.*"
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
runs-on: ${{ matrix.os }}
timeout-minutes: 15
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: |
rustup update stable
rustup default stable
rustup target add ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: "release-${{ matrix.target }}"
- uses: actions/cache@v4
with:
path: ~/.cache/typst
key: typst
- run: |
if [[ ${{ matrix.os }} = "windows-latest" ]]; then
EXT=".exe"
else
EXT=""
fi
echo "EXT: $EXT"
echo "ext=$EXT" >> $GITHUB_OUTPUT
id: check
shell: bash
- run: |
SRC="target/${{ matrix.target }}/release/trv${{ steps.check.outputs.ext }}"
echo "SRC: $SRC"
DST="target/release/trv-${{ matrix.target }}${{ steps.check.outputs.ext }}"
echo "DST: $DST"
cargo build --release --target ${{ matrix.target }}
mv -v $SRC $DST
echo "dst=$DST" >> $GITHUB_OUTPUT
id: release
shell: bash
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
fail_on_unmatched_files: true
files: ${{ steps.release.outputs.dst }}
body: |
Notable changes since the last release are documented in the [CHANGELOG.md](https://github.com/transformrs/trv/blob/main/CHANGELOG.md) file.