Skip to content

cli v0.2.2

cli v0.2.2 #5

Workflow file for this run

name: squishy release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
publish-binaries:
name: Publish binaries
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
build:
- {
NAME: x86_64-linux,
TOOLCHAIN: stable,
TARGET: x86_64-unknown-linux-musl,
}
- {
NAME: aarch64-linux,
TOOLCHAIN: stable,
TARGET: aarch64-unknown-linux-musl,
}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set the release version
shell: bash
run: echo "RELEASE_VERSION=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Install dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
--allow-unauthenticated musl-tools b3sum
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.build.TOOLCHAIN }}
target: ${{ matrix.build.TARGET }}
override: true
- name: Build
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --locked --target ${{ matrix.build.TARGET }}
- name: Prepare release assets
shell: bash
run: |
mkdir -p release
cp {LICENSE,README.md} release/
cp "target/${{ matrix.build.TARGET }}/release/squishy" release/
- name: Create release artifacts
shell: bash
run: |
cp release/squishy squishy-${{ matrix.build.NAME }}
b3sum squishy-${{ matrix.build.NAME }} \
> squishy-${{ matrix.build.NAME }}.b3sum
tar -czvf squishy-${{ matrix.build.NAME }}.tar.gz \
release/
b3sum squishy-${{ matrix.build.NAME }}.tar.gz \
> squishy-${{ matrix.build.NAME }}.tar.gz.b3sum
- name: Publish to GitHub
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: squishy-${{ matrix.build.NAME }}*
file_glob: true
overwrite: true
tag: ${{ github.ref }}
release_name: "squishy v${{ env.RELEASE_VERSION }}"