-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (80 loc) · 2.75 KB
/
rust-release.yml
File metadata and controls
88 lines (80 loc) · 2.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: Rust Release
on:
# workflow_dispatch:
release:
types: [published]
env:
CARGO_TERM_COLOR: always
jobs:
release:
name: release ${{ matrix.target }}
# runs-on: ubuntu-latest
runs-on: ${{ matrix.runs-on }}
permissions:
contents: write
defaults:
run:
working-directory: ./wavetable-synth.plugin
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-pc-windows-gnu
system: windows
# toolchain: nightly
toolchain: stable
runs-on: windows-latest
install-deps: ""
# zip: "Compress-Archive -Path 'target/bundled/*' -DestinationPath wt-synth-windows.zip"
- target: x86_64-unknown-linux-gnu
system: linux
# toolchain: nightly
toolchain: stable
runs-on: ubuntu-latest
install-deps: "sudo apt update; sudo apt install libasound2-dev zip"
# zip: "zip -r wt-synth-linux.zip target/bundled/*"
- target: x86_64-apple-darwin
system: mac-os-arm
# toolchain: nightly
toolchain: stable
runs-on: macos-latest
install-deps: ""
# zip: "zip -r wt-synth-mac-os-arm.zip target/bundled/*"
steps:
- uses: actions/checkout@v4
- name: Use Rust cache
uses: Swatinem/rust-cache@v2
with:
# Caches target directory and Cargo home
key: ${{ runner.os }}-${{ matrix.toolchain }}-${{ hashFiles('**/Cargo.lock') }}
- name: install deps
run: "${{ matrix.install-deps }}"
- name: kill standalone (rm once GUI is written)
run: rm ./src/main.rs
- name: Build
run: cargo xtask bundle wt_synth --release
# - name: Create zip
# run: ${{ matrix.zip }}
- name: Archive Release
uses: thedoctor0/zip-release@0.7.6
with:
type: 'zip'
directory: 'wavetable-synth.plugin'
filename: 'wt-synth-${{ matrix.system }}.zip'
path: 'target/bundled/'
# - name: Create Release and Upload Artifact
# uses: softprops/action-gh-release@v2
# with:
# tag_name: ${{ github.event.release.tag_name }}
# files: wt-synth-${{ matrix.system }}.zip
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./wavetable-synth.plugin/wt-synth-${{ matrix.system }}.zip
asset_name: wt-synth-${{ matrix.system }}.zip
asset_content_type: application/zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}