chore: release rumqttd v0.19.0 #23
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: Releaser | |
on: | |
push: | |
tags: | |
- 'rumqttd-*' | |
jobs: | |
build-release: | |
name: Build release for ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
build: [linux-musl, linux-gnu] | |
include: | |
- build: linux-musl | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-musl | |
- build: linux-gnu | |
os: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
with: | |
components: clippy | |
target: ${{ matrix.target }} | |
- name: Use Cross | |
shell: bash | |
run: | | |
cargo install cross --git https://github.com/cross-rs/cross | |
echo "CARGO=cross" >> $GITHUB_ENV | |
echo "TARGET_FLAGS=--target ${{ matrix.target }}" >> $GITHUB_ENV | |
echo "TARGET_DIR=./target/${{ matrix.target }}" >> $GITHUB_ENV | |
- name: Build release binary | |
run: cross build --verbose --release ${{ env.TARGET_FLAGS }} -p rumqttd | |
- name: rename | |
# this assumes git tag is in format rumqttd-x.x.x | |
run: mv ${{ env.TARGET_DIR }}/release/rumqttd ${{ github.ref_name }}-${{ matrix.build }} | |
- name: Upload release archive | |
uses: softprops/action-gh-release@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: rumqttd* |