Skip to content

Github Release

Github Release #17

Workflow file for this run

name: Github Release
permissions:
# TODO: once `releases: write` is supported, use it instead.
contents: write
on:
release:
branches: [main]
tags:
- v[0-9]+.*
env:
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
jobs:
upload-binaries:
name: upload-binaries
if: github.repository == 'zeskeertwee/vach'
strategy:
matrix:
include:
# linux x86
- target: x86_64-unknown-linux-gnu
# windows x86
- target: x86_64-pc-windows-gnu
os: windows-latest
# apple x86
- target: x86_64-apple-darwin
os: macos-latest
# linux arm64
- target: aarch64-unknown-linux-gnu
# apple silicon (arm64)
- target: aarch64-apple-darwin
os: macos-latest
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
- uses: taiki-e/github-actions/install-rust@main
with:
toolchain: nightly
- name: Run tests
run: cargo test --verbose -- --test-threads=1
- uses: taiki-e/create-gh-release-action@v1
with:
title: $version
branch: main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
bin: vach
target: ${{ matrix.target }}
tar: unix
zip: windows
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_PROFILE_RELEASE_LTO: true
CARGO_PROFILE_RELEASE_CODEGEN_UNITS: 1