chore: merge release-v0.2.17 into main #29
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: Release CI | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+" | |
jobs: | |
cross_platform_build: | |
strategy: | |
matrix: | |
include: | |
- target: aarch64-unknown-linux-musl | |
output_name: linux_aarch64.tar.gz | |
- target: arm-unknown-linux-musleabihf | |
output_name: linux_armv6.tar.gz | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
# Install stable rust, and associated tools | |
- name: install rust | |
uses: dtolnay/rust-toolchain@stable | |
# Install cross-rs | |
- name: install cross | |
run: cargo install cross --git https://github.com/cross-rs/cross | |
# Build binary | |
- name: build | |
run: cross build --target ${{ matrix.target }} --release | |
# Compress the output | |
- name: compress | |
run: | | |
tar -C "target/${{ matrix.target }}/release" -czf "./leafcast_${{ matrix.output_name }}" leafcast | |
# Upload output for release page | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: ${{ matrix.target }} | |
path: leafcast_${{ matrix.output_name }} | |
retention-days: 1 | |
################### | |
## Create release # | |
################### | |
create_release: | |
needs: [cross_platform_build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup | Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Update Release | |
uses: ncipollo/release-action@v1 | |
with: | |
makeLatest: true | |
name: ${{ github.ref_name }} | |
tag: ${{ github.ref }} | |
bodyFile: ".github/release-body.md" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
artifacts: | | |
**/leafcast_*.tar.gz |