Skip to content

2.1.0

2.1.0 #13

Workflow file for this run

name: Release
permissions:
contents: write
on:
release:
types: [published]
#push:
# tags:
# # Regex for a version number such as 0.2.1
# - "[0-9]+.[0-9]+.[0-9]+"
# # Regex for a version number such as 0.2.1-RC1
# - "[0-9]+.[0-9]+.[0-9]+.*RC.*"
jobs:
upload-assets:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# You can add more, for any target you'd like!
include:
- build: linux
os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- build: macos_x86_64
os: macos-latest
target: x86_64-apple-darwin
- build: windows
os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- name: Rust Cache
uses: Swatinem/rust-cache@v2.7.3
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cargo edit
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-edit
- name: Set release version
uses: actions-rs/cargo@v1
with:
command: set-version
args: ${{ github.ref_name }}
- uses: taiki-e/upload-rust-binary-action@v1
with:
# (required) Comma-separated list of binary names (non-extension portion of filename) to build and upload.
# Note that glob pattern is not supported yet.
bin: pippo
# (optional) Target triple, default is host triple.
# This is optional but it is recommended that this always be set to
# clarify which target you are building for if macOS is included in
# the matrix because GitHub Actions changed the default architecture
# of macos-latest since macos-14.
target: ${{ matrix.target }}
# (optional) On which platform to distribute the `.tar.gz` file.
# [default value: unix]
# [possible values: all, unix, windows, none]
tar: unix
# (optional) On which platform to distribute the `.zip` file.
# [default value: windows]
# [possible values: all, unix, windows, none]
zip: windows
# [possible values: the following variables and any string]
# variables:
# - $bin - Binary name (non-extension portion of filename).
# - $target - Target triple.
# - $tag - Tag of this release.
# When multiple binary names are specified, default archive name or $bin variable cannot be used.
archive: $bin-$tag-$target
# (required) GitHub token for uploading assets to GitHub Releases.
token: ${{ secrets.GITHUB_TOKEN }}