-
Notifications
You must be signed in to change notification settings - Fork 14
88 lines (84 loc) · 2.53 KB
/
release.yml
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: Release
on:
workflow_dispatch:
push:
tags:
- "v*"
env:
CARGO_TERM_COLOR: always
jobs:
create_release:
name: Create release
runs-on: macos-latest
outputs:
id: ${{ steps.draft_release.outputs.id }}
html_url: ${{ steps.draft_release.outputs.html_url }}
upload_url: ${{ steps.draft_release.outputs.upload_url }}
steps:
- name: Draft release
id: draft_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: true
build_release:
name: Build release
needs: create_release
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: ubuntu-latest
name: linux
arch: x86-64
asset_path: ./target/release/libampli_fe.so
plugin_ext: .so
- os: macos-latest
name: macos
arch: x86-64
asset_path: ./ampli-Fe.vst
plugin_ext: .vst
- os: windows-latest
name: windows
arch: x86-64
asset_path: ./target/release/ampli_fe.dll
plugin_ext: .dll
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install zip on Windows
if: matrix.os == 'windows-latest'
shell: bash
run: choco install zip
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: build
args: --release
- name: Bundle macOS plugin
if: matrix.os == 'macos-latest'
shell: bash
run: ./bundle_macos.sh
- name: Move Linux and Windows plugins
if: matrix.os == 'ubuntu-latest' || matrix.os == 'windows-latest'
shell: bash
run: mv ${{ matrix.asset_path }} ./ampli-Fe${{ matrix.plugin_ext }}
- name: Create plugin zip archive
shell: bash
run: |
zip -r ampli-Fe.zip ./ampli-Fe${{ matrix.plugin_ext }}
- name: Upload plugin archive
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_path: ./ampli-Fe.zip
asset_name: ampli-Fe_${{ matrix.name }}-${{ matrix.arch }}.zip
asset_content_type: application/octet-stream