Skip to content

More temperament layouts #89

More temperament layouts

More temperament layouts #89

name: Create microwave release assets
on:
release:
types: [created]
jobs:
create-release-assets:
name: Create microwave ${{ matrix.target }} release
if: startsWith(github.event.release.tag_name, 'microwave')
runs-on: ${{ matrix.os }}
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
- x86_64-pc-windows-msvc
- x86_64-apple-darwin
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-pc-windows-msvc
os: windows-latest
- target: x86_64-apple-darwin
os: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Linux dependencies
if: matrix.os == 'ubuntu-latest'
run: sudo apt update && sudo apt install libasound2-dev libudev-dev
- name: Install ${{ matrix.target }} target
run: rustup target add ${{ matrix.target }}
- name: Build microwave
run: cargo b --release -p microwave --target ${{ matrix.target }}
- name: Package microwave with zip
if: matrix.os != 'windows-latest'
run: |
mkdir -p archive/assets
cp target/${{ matrix.target }}/release/microwave archive
cp microwave/README.md archive
cp microwave/lgpl-2.1.md archive
cp microwave/assets/FiraSans-Regular.ttf archive/assets
cp microwave/*.yml archive
cd archive
zip -r ../microwave *
- name: Package microwave with 7z
if: matrix.os == 'windows-latest'
run: |
mkdir -p archive/assets
Copy-Item ./target/${{ matrix.target }}/release/microwave.exe -Destination ./archive
Copy-Item ./microwave/README.md -Destination ./archive
Copy-Item ./microwave/lgpl-2.1.md -Destination ./archive
Copy-Item ./microwave/assets/FiraSans-Regular.ttf -Destination ./archive/assets
Copy-Item ./microwave/*.yml -Destination ./archive
cd archive
7z a ../microwave.zip -r *
- name: Upload microwave release asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./microwave.zip
asset_name: ${{ github.event.release.tag_name }}-${{ matrix.target }}.zip
asset_content_type: application/zip