gitignore #16
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: Create Release | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Install Development Packages | |
run: sudo apt-get update && sudo apt-get install -y libxcb-icccm4-dev libx11-xcb-dev libxcb-dri2-0 libxcb-dri2-0-dev xorg-dev libasound2-dev libjack-jackd2-dev | |
- name: Set release tag | |
id: set_tag | |
run: | | |
tag=$(git rev-parse --short=8 ${{ github.sha }}) | |
echo "tag=${tag}" >> $GITHUB_ENV | |
- name: Build for Linux x86-64 | |
run: | | |
rustup target add x86_64-unknown-linux-gnu | |
cargo xtask bundle minimal_vst_gain --release --target x86_64-unknown-linux-gnu | |
ls -l target | |
find target/bundled | |
zip -r minimal_vst_gain-vst3-linux.zip target/bundled/minimal_vst_gain.vst3 | |
zip -r minimal_vst_gain-clap-linux.zip target/bundled/minimal_vst_gain.clap | |
- name: Generate Changelog | |
run: echo "# Release Notes" > changelog.txt # Replace this with your actual changelog content | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
changelog.txt | |
minimal_vst_gain-vst3-linux.zip | |
minimal_vst_gain-clap-linux.zip | |
body_path: changelog.txt | |
tag_name: ${{ env.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build-macos: | |
runs-on: macOS-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
- name: Set release tag | |
id: set_tag | |
run: | | |
tag=$(git rev-parse --short=8 ${{ github.sha }}) | |
echo "tag=${tag}" >> $GITHUB_ENV | |
- name: Build for macOS | |
run: | | |
rustup target add x86_64-apple-darwin | |
cargo xtask bundle minimal_vst_gain --release --target x86_64-apple-darwin | |
find target/bundled | |
zip -r minimal_vst_gain-vst3-macos.zip target/bundled/minimal_vst_gain.vst3 | |
zip -r minimal_vst_gain-clap-macos.zip target/bundled/minimal_vst_gain.clap | |
- name: Generate Changelog | |
run: echo "# Release Notes" > changelog.txt # Replace this with your actual changelog content | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
changelog.txt | |
minimal_vst_gain-vst3-macos.zip | |
minimal_vst_gain-clap-macos.zip | |
body_path: changelog.txt | |
tag_name: ${{ env.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
build-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable-msvc | |
- name: Set release tag | |
id: set_tag | |
shell: powershell | |
run: | | |
$tag = git rev-parse --short=8 $env:GITHUB_SHA | |
Set-Content -Path $env:GITHUB_ENV -Value "tag=$tag" | |
- name: Build for Windows x86-64 | |
run: | | |
cargo xtask bundle minimal_vst_gain --release --target x86_64-pc-windows-msvc | |
Get-ChildItem -Path "target\\bundled" -Recurse | |
Compress-Archive -Path "target\\bundled\\minimal_vst_gain.vst3" -DestinationPath "minimal_vst_gain-vst3-windows.zip" | |
Compress-Archive -Path "target\\bundled\\minimal_vst_gain.clap" -DestinationPath "minimal_vst_gain-clap-windows.zip" | |
- name: Generate Changelog | |
run: echo "# Release Notes" > changelog.txt # Replace this with your actual changelog content | |
- name: Create Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
changelog.txt | |
minimal_vst_gain-vst3-windows.zip | |
minimal_vst_gain-clap-windows.zip | |
body_path: changelog.txt | |
tag_name: ${{ env.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} |