Skip to content

v0.2.1

v0.2.1 #29

Workflow file for this run

name: release
on:
release:
types: [published]
workflow_dispatch: # for testing
env:
BUILT_DEB_FILE: "invalid.deb" # updated by make-debian-package script
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
permissions:
contents: write
jobs:
binary:
strategy:
matrix:
include:
- build: x86_64-musl
host: ubuntu-latest
target: x86_64-unknown-linux-musl
rust: stable
build_deb: true
- build: aarch64-musl
host: ubuntu-latest
target: aarch64-unknown-linux-musl
rust: stable
build_deb: true
runs-on: ${{ matrix.host }}
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
targets: ${{ matrix.target }}
- uses: taiki-e/[email protected]
with:
tool: cross,cargo-deb
- uses: Swatinem/rust-cache@v2
with:
key: "${{matrix.build}}"
- name: install packages (ubuntu builds only)
if: startsWith(matrix.host, 'ubuntu')
run: scripts/install-ubuntu-packages
# native builds need all of these; cross builds only need binutils-multiarch
#- name: Build
# run: cross build --release --locked --target ${{ matrix.target }}
- uses: taiki-e/[email protected]
id: build
with:
bin: qcp
token: ${{ secrets.GITHUB_TOKEN }}
target: ${{ matrix.target }}
include: README.md,LICENSE,CHANGELOG.md
leading-dir: true
locked: true
tar: unix
zip: windows
dry_run: ${{ github.event_name != 'release' }}
- name: Make deb package
if: ${{ matrix.build_deb }}
run: scripts/make-debian-package --release ${{ matrix.target }}
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: qcp-tarball-${{ matrix.target }}
path: ${{ steps.build.outputs.archive }}.tar.gz
- name: Upload deb artifact
if: ${{ matrix.build_deb }}
uses: actions/upload-artifact@v4
with:
name: qcp-deb-${{ matrix.target }}
path: ${{ env.BUILT_DEB_FILE }}
- name: Publish deb package to release
if: ${{ matrix.build_deb }} && ${{ github.event_name == 'release' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ github.ref_name }} ${{ env.BUILT_DEB_FILE }}