Skip to content

Release

Release #1

Workflow file for this run

name: Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/create-gh-release-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Set the TAG variable without the 'v' prefix
id: set-tag
run: echo "TAG=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
outputs:
TAG: ${{ steps.set-tag.outputs.TAG }}
upload-assets:
needs: create-release
env:
TAG: ${{ needs.create-release.outputs.TAG }}
strategy:
matrix:
include:
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
tar_os: linux
tar_arch: arm64
- target: aarch64-apple-darwin
os: macos-latest
tar_os: darwin
tar_arch: arm64
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
tar_os: linux
tar_arch: amd64
- target: x86_64-apple-darwin
os: macos-latest
tar_os: darwin
tar_arch: amd64
- target: x86_64-pc-windows-msvc
os: windows-latest
tar_os: windows
tar_arch: amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: ppr
target: ${{ matrix.target }}
token: ${{ secrets.GITHUB_TOKEN }}
archive: papier-${{ env.TAG }}-${{ matrix.tar_os }}-${{ matrix.tar_arch }}