chore(main): release 0.1.2 (#16) #24
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: Upload artifacts | |
on: | |
push: | |
tags: ["v*"] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
PROJECT_NAME: Beatrec | |
jobs: | |
build: | |
runs-on: ${{ matrix.runner }} | |
strategy: | |
matrix: | |
include: | |
- name: linux-x86_64 | |
runner: ubuntu-latest | |
target: x86_64-unknown-linux-gnu | |
# - name: win-x86_64 | |
# runner: windows-latest | |
# target: x86_64-pc-windows-msvc | |
- name: macos-x86_64 | |
runner: macos-latest | |
target: x86_64-apple-darwin | |
- name: macos-arm64 | |
runner: macos-latest | |
target: aarch64-apple-darwin | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
targets: "${{ matrix.target }}" | |
- name: Setup Cache | |
uses: Swatinem/rust-cache@v2 | |
- name: Install system dependencies (Linux) | |
if: ${{ matrix.name == 'linux-x86_64' }} | |
run: | | |
sudo apt update | |
sudo apt-get update | |
sudo apt-get -y install \ | |
libasound2-dev \ | |
libgl1-mesa-dev \ | |
libjack-dev \ | |
libx11-dev \ | |
libx11-xcb-dev \ | |
libxcb-dri2-0-dev \ | |
libxcb-icccm4-dev \ | |
libxcursor-dev \ | |
libxss-dev | |
- name: Build | |
run: cargo xtask bundle beatrec --release --target ${{ matrix.target }} | |
- name: Zip artifacts (non-Windows) | |
if: ${{ matrix.name != 'win-x86_64' }} | |
run: | | |
cd ./target/bundled && \ | |
mv ./beatrec.clap ./Beatrec.clap && \ | |
mv ./beatrec.vst3 ./Beatrec.vst3 && \ | |
zip -r ./beatrec-${{ github.ref_name }}-${{ matrix.name }}-clap.zip ./Beatrec.clap && \ | |
zip -r ./beatrec-${{ github.ref_name }}-${{ matrix.name }}-vst3.zip ./Beatrec.vst3 | |
- name: Upload artifacts | |
env: | |
GITHUB_TOKEN: ${{ secrets.BEATREC_PAT }} | |
run: | | |
gh release upload ${{ github.ref_name }} \ | |
./target/bundled/beatrec-${{ github.ref_name }}-${{ matrix.name }}-clap.zip \ | |
./target/bundled/beatrec-${{ github.ref_name }}-${{ matrix.name }}-vst3.zip | |
trigger_workflow: | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Trigger workflow for tphbrok.github.io | |
run: | | |
# Set the required variables | |
repo_owner="tphbrok" | |
repo_name="tphbrok.github.io" | |
event_type="trigger-workflow" | |
service="${{ github.event.inputs.target_service }}" | |
version="${{ github.event.inputs.target_version }}" | |
curl -L \ | |
-X POST \ | |
-H "Accept: application/vnd.github+json" \ | |
-H "Authorization: Bearer ${{ secrets.TPHBROK_GITHUB_IO_PAT }}" \ | |
-H "X-GitHub-Api-Version: 2022-11-28" \ | |
https://api.github.com/repos/$repo_owner/$repo_name/dispatches \ | |
-d "{\"event_type\": \"$event_type\", \"client_payload\": {\"service\": \"$service\", \"version\": \"$version\", \"unit\": false, \"integration\": true}}" |