chore: Release #82
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Packaging | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
publish: | |
name: Publish on ${{ matrix.os }} for ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
compress: true | |
- os: ubuntu-latest | |
target: aarch64-unknown-linux-musl | |
compress: true | |
- os: ubuntu-latest | |
target: armv7-unknown-linux-musleabihf | |
compress: true | |
- os: ubuntu-latest | |
target: arm-unknown-linux-musleabihf | |
compress: true | |
- os: ubuntu-latest | |
target: x86_64-unknown-freebsd | |
compress: false | |
- os: windows-latest | |
target: x86_64-pc-windows-msvc | |
compress: false | |
- os: macos-latest | |
target: x86_64-apple-darwin | |
compress: false | |
- os: macos-latest | |
target: aarch64-apple-darwin | |
compress: false | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
- run: sudo apt install musl-tools | |
if: startsWith(matrix.os, 'ubuntu') | |
- name: cargo build | |
uses: houseabsolute/actions-rust-cross@v0 | |
with: | |
command: build | |
args: --release --locked | |
target: ${{ matrix.target }} | |
- name: Set exe extension for Windows | |
run: echo "EXE=.exe" >> $env:GITHUB_ENV | |
if: startsWith(matrix.os, 'windows') | |
- name: Compress client | |
uses: svenstaro/upx-action@v2 | |
with: | |
file: target/${{ matrix.target }}/release/pueue${{ env.EXE }} | |
args: --best --lzma | |
strip: false | |
if: ${{ matrix.compress }} | |
- name: Compress daemon | |
uses: svenstaro/upx-action@v2 | |
with: | |
file: target/${{ matrix.target }}/release/pueued${{ env.EXE }} | |
args: --best --lzma | |
strip: false | |
if: ${{ matrix.compress }} | |
- name: Upload client binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/${{ matrix.target }}/release/pueue${{ env.EXE }} | |
asset_name: pueue-${{ matrix.target }}${{ env.EXE }} | |
tag: ${{ github.ref }} | |
overwrite: true | |
- name: Upload daemon binaries to release | |
uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: target/${{ matrix.target }}/release/pueued${{ env.EXE }} | |
asset_name: pueued-${{ matrix.target }}${{ env.EXE }} | |
tag: ${{ github.ref }} | |
overwrite: true | |
- uses: svenstaro/upload-release-action@v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: utils/pueued.service | |
tag: ${{ github.ref }} | |
asset_name: systemd.pueued.service | |
body: ${{ steps.changelog_reader.outputs.log_entry }} | |
if: matrix.target == 'x86_64-unknown-linux-musl' |