Skip to content

add release flow

add release flow #1

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- aarch64-unknown-linux-gnu
steps:
- uses: actions/checkout@v4
- name: Install cross
run: cargo install cross --git https://github.com/cross-rs/cross
- name: Build
run: cross build --release --target ${{ matrix.target }}
- name: Package
run: |
tar czf rdmatop-${{ github.ref_name }}-${{ matrix.target }}.tar.gz \
-C target/${{ matrix.target }}/release rdmatop
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: rdmatop-${{ matrix.target }}
path: rdmatop-*.tar.gz
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Create release
uses: softprops/action-gh-release@v2
with:
files: rdmatop-*.tar.gz
generate_release_notes: true