Release 0.6.4 #41
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
permissions: | |
contents: read | |
on: | |
push: | |
tags: | |
- v[0-9]+.* | |
env: | |
CARGO_INCREMENTAL: 0 | |
CARGO_NET_GIT_FETCH_WITH_CLI: true | |
CARGO_NET_RETRY: 10 | |
CARGO_TERM_COLOR: always | |
RUST_BACKTRACE: 1 | |
RUSTFLAGS: -D warnings | |
RUSTUP_MAX_RETRIES: 10 | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
create-release: | |
if: github.repository_owner == 'taiki-e' | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 60 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install Rust | |
run: rustup update stable --no-self-update | |
- run: cargo package | |
- uses: taiki-e/create-gh-release-action@v1 | |
with: | |
changelog: CHANGELOG.md | |
title: $version | |
branch: main | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- run: cargo publish | |
env: | |
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
upload-assets: | |
name: ${{ matrix.target }} | |
if: github.repository_owner == 'taiki-e' | |
needs: | |
- create-release | |
strategy: | |
matrix: | |
# When updating this list, the reminder to update the target list in ci.yml. | |
include: | |
- target: aarch64-unknown-linux-gnu | |
- target: aarch64-unknown-linux-musl | |
- target: aarch64-apple-darwin | |
os: macos-11 | |
- target: aarch64-pc-windows-msvc | |
os: windows-2019 | |
- target: x86_64-unknown-linux-gnu | |
- target: x86_64-unknown-linux-musl | |
- target: x86_64-apple-darwin | |
os: macos-11 | |
- target: x86_64-pc-windows-msvc | |
os: windows-2019 | |
- target: x86_64-unknown-freebsd | |
- target: universal-apple-darwin | |
os: macos-11 | |
runs-on: ${{ matrix.os || 'ubuntu-20.04' }} | |
timeout-minutes: 60 | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Install Rust | |
run: rustup update stable --no-self-update | |
- uses: taiki-e/setup-cross-toolchain-action@v1 | |
with: | |
target: ${{ matrix.target }} | |
- run: echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >>"${GITHUB_ENV}" | |
if: endsWith(matrix.target, 'windows-msvc') | |
- uses: taiki-e/upload-rust-binary-action@v1 | |
with: | |
bin: cargo-hack | |
target: ${{ matrix.target }} | |
tar: all | |
zip: windows | |
token: ${{ secrets.GITHUB_TOKEN }} |