Skip to content

v0.4.2 backportapalooza (#303) #29

v0.4.2 backportapalooza (#303)

v0.4.2 backportapalooza (#303) #29

Workflow file for this run

name: Release
on:
push:
tags: ["v[0-9]+.[0-9]+.[0-9]+*"]
jobs:
release:
permissions: write-all
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: Install packages (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
ci/ubuntu-install-packages
- name: Set the version
id: version
shell: bash
run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/}
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build
run: |
cargo build --target ${{ matrix.target }} --profile release-lto --locked
- name: Build archive
shell: bash
run: |
staging="inlyne-${{ steps.version.outputs.VERSION }}-${{ matrix.target }}"
mkdir -p "$staging"
cp -r {README.md,LICENSE,example.png,inlyne.default.toml,completions} "$staging/"
if [ "${{ matrix.os }}" = "windows-latest" ]; then
cp "target/${{ matrix.target }}/release-lto/inlyne.exe" "$staging/"
7z a "$staging.zip" "$staging"
echo "ASSET=$staging.zip" >> $GITHUB_ENV
else
cp "target/${{ matrix.target }}/release-lto/inlyne" "$staging/"
tar czf "$staging.tar.gz" "$staging"
echo "ASSET=$staging.tar.gz" >> $GITHUB_ENV
fi
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ${{ env.ASSET }}
asset_name: ${{ env.ASSET }}
tag: ${{ github.ref }}