Skip to content

release v0.0.3

release v0.0.3 #80

Workflow file for this run

on:
push:
tags:
- '*'
defaults:
run:
shell: bash
jobs:
release:
strategy:
fail-fast: false
matrix:
target:
# shooting very wide here
# fortunately I have enough Actions minutes
# to do shit like this
- aarch64-apple-darwin
- aarch64-linux-android
- aarch64-pc-windows-msvc
- aarch64-unknown-linux-musl
- arm-unknown-linux-musleabihf
- armv7-linux-androideabi
- armv7-unknown-linux-musleabihf
- i686-linux-android
- i686-pc-windows-msvc
- i686-unknown-linux-musl
- x86_64-apple-darwin
- x86_64-pc-windows-msvc
- x86_64-unknown-freebsd
- x86_64-unknown-illumos
- x86_64-unknown-linux-musl
- x86_64-unknown-netbsd
# these build, but does anyone need them?
# also, can't be +crt-static'd
#- powerpc-unknown-linux-gnu
#- powerpc64-unknown-linux-gnu
#- powerpc64le-unknown-linux-gnu
#- riscv64gc-unknown-linux-gnu
#- s390x-unknown-linux-gnu
include:
- target: aarch64-apple-darwin
os: macos-latest
- target: aarch64-linux-android
os: ubuntu-latest
cargo: cross
- target: aarch64-pc-windows-msvc
os: windows-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
cargo: cross
- target: arm-unknown-linux-musleabihf
os: ubuntu-latest
- target: armv7-linux-androideabi
os: ubuntu-latest
cargo: cross
- target: armv7-unknown-linux-musleabihf
os: ubuntu-latest
- target: i686-linux-android
os: ubuntu-latest
cargo: cross
- target: i686-pc-windows-msvc
os: windows-latest
- target: i686-unknown-linux-musl
os: ubuntu-latest
- target: mips-unknown-linux-musl
os: ubuntu-latest
cargo: cross
- target: mips64-unknown-linux-muslabi64
os: ubuntu-latest
cargo: cross
- target: mips64el-unknown-linux-muslabi64
os: ubuntu-latest
cargo: cross
- target: mipsel-unknown-linux-musl
os: ubuntu-latest
cargo: cross
- target: x86_64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-unknown-freebsd
os: ubuntu-latest
cargo: cross
- target: x86_64-unknown-illumos
os: ubuntu-latest
cargo: cross
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: x86_64-unknown-netbsd
os: ubuntu-latest
cargo: cross
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1 # we don't build pre-releases anyway
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
- name: setup stable rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: ${{ matrix.target }}
- name: install llvm toolchains
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y clang llvm lld
- name: setup windows paths for cross-compilation
if: ${{ matrix.target == 'aarch64-pc-windows-msvc' }}
run: |
echo 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\Enterprise\\VC\\Tools\\Llvm\\x64\\bin' >> $GITHUB_PATH
- name: see if previous step actually worked
if: ${{ matrix.target == 'aarch64-pc-windows-msvc' }}
run: |
echo $PATH
clang --version
- name: setup ripgrep
uses: lmaotrigine/fetch-crate-action@mistress
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: BurntSushi
name: ripgrep
bin: rg
- name: setup cross
if: ${{ matrix.cargo == 'cross' }}
uses: lmaotrigine/fetch-crate-action@mistress
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
owner: cross-rs
name: cross
- name: ref type
id: ref-type
run: ./bin/ref-type $REF >> "$GITHUB_OUTPUT"
env:
REF: ${{ github.ref }}
- name: package
id: package
env:
TARGET: ${{ matrix.target }}
REF: ${{ github.ref }}
OS: ${{ matrix.os }}
CARGO: ${{ matrix.cargo }}
run: ./bin/package
shell: bash
- name: publish archive
uses: softprops/action-gh-release@v1
if: ${{ startsWith(github.ref, 'refs/tags/') }}
with:
draft: true
files: |
${{ steps.package.outputs.archive }}
${{ steps.package.outputs.checksumfile }}
${{ steps.package.outputs.tar_archive }}
${{ steps.package.outputs.tar_checksumfile }}
prerelease: ${{ steps.ref-type.outputs.value != 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}