Skip to content

BSUd 0.1.3

BSUd 0.1.3 #4

Workflow file for this run

name: release
on:
push:
tags:
- v*
workflow_dispatch:
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: true
prerelease: false
generate_release_notes: true
artefact:
strategy:
matrix:
include:
- name: Linux x86_64
os: ubuntu-latest
target: x86_64-unknown-linux-musl
suffix: ''
runs-on: ${{ matrix.os }}
name: Create artefact for ${{ matrix.name }}
needs: [release]
steps:
- uses: actions/checkout@v3
- name: Stable Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
target: ${{ matrix.target }}
toolchain: stable
- name: Install musl-tools
run: sudo apt update -y && sudo apt install musl-tools -y
if: matrix.os == 'ubuntu-latest'
- name: Build
run: cargo build --target ${{ matrix.target }} --release
- name: Move binary
run: mv target/${{ matrix.target }}/release/bsud${{ matrix.suffix }} bsud-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.suffix }}
- name: Upload Artefact to release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
tag_name: ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
draft: true
prerelease: false
files: bsud-${{ github.ref_name }}-${{ matrix.target }}${{ matrix.suffix }}