-
-
Notifications
You must be signed in to change notification settings - Fork 14
185 lines (153 loc) · 6.42 KB
/
Copy pathrelease.yml
File metadata and controls
185 lines (153 loc) · 6.42 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
name: Release
on:
push:
tags:
- 'v*'
jobs:
build-windows:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release
- name: Package
run: |
mkdir staging
cp -r build/Intersect_artefacts/Release/VST3/INTERSECT.vst3 staging/
cp build/Intersect_artefacts/Release/Standalone/INTERSECT.exe staging/
cd staging && 7z a ../INTERSECT-${{ github.ref_name }}-Windows-x64.zip *
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-Windows-x64
path: INTERSECT-${{ github.ref_name }}-Windows-x64.zip
build-linux:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libasound2-dev libfreetype-dev libx11-dev libxrandr-dev libxcursor-dev libxinerama-dev libwebkit2gtk-4.1-dev libcurl4-openssl-dev
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release
- name: Package
run: |
mkdir staging
cp -r build/Intersect_artefacts/Release/VST3/INTERSECT.vst3 staging/
cp build/Intersect_artefacts/Release/Standalone/INTERSECT staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-Linux-x64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-Linux-x64
path: INTERSECT-${{ github.ref_name }}-Linux-x64.zip
build-macos-arm64:
runs-on: macos-latest
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release
- name: Codesign
run: |
codesign --force --deep --sign - build/Intersect_artefacts/Release/AU/INTERSECT.component
codesign --force --deep --sign - build/Intersect_artefacts/Release/VST3/INTERSECT.vst3
codesign --force --deep --sign - build/Intersect_artefacts/Release/Standalone/INTERSECT.app
- name: Package
run: |
mkdir staging
cp -r build/Intersect_artefacts/Release/VST3/INTERSECT.vst3 staging/
cp -r build/Intersect_artefacts/Release/Standalone/INTERSECT.app staging/
cp -r build/Intersect_artefacts/Release/AU/INTERSECT.component staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-macOS-arm64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-macOS-arm64
path: INTERSECT-${{ github.ref_name }}-macOS-arm64.zip
build-macos-x64:
runs-on: macos-15-intel
steps:
- uses: actions/checkout@v5
with:
submodules: recursive
- name: Get version
shell: bash
run: echo "PLUGIN_VERSION=$(echo '${{ github.ref_name }}' | sed 's/^v//')" >> $GITHUB_ENV
- name: Configure
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DINTERSECT_VERSION=${{ env.PLUGIN_VERSION }}
- name: Build
run: cmake --build build --config Release
- name: Codesign
run: |
codesign --force --deep --sign - build/Intersect_artefacts/Release/AU/INTERSECT.component
codesign --force --deep --sign - build/Intersect_artefacts/Release/VST3/INTERSECT.vst3
codesign --force --deep --sign - build/Intersect_artefacts/Release/Standalone/INTERSECT.app
- name: Package
run: |
mkdir staging
cp -r build/Intersect_artefacts/Release/VST3/INTERSECT.vst3 staging/
cp -r build/Intersect_artefacts/Release/Standalone/INTERSECT.app staging/
cp -r build/Intersect_artefacts/Release/AU/INTERSECT.component staging/
cd staging && zip -r ../INTERSECT-${{ github.ref_name }}-macOS-x64.zip .
- uses: actions/upload-artifact@v5
with:
name: INTERSECT-macOS-x64
path: INTERSECT-${{ github.ref_name }}-macOS-x64.zip
release:
needs: [build-windows, build-linux, build-macos-arm64, build-macos-x64]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v5
- name: Extract changelog for this version
run: |
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
# Extract the section for this version from CHANGELOG.md
# Matches from the version heading to the next heading (or EOF)
awk -v ver="$VERSION" '
/^## \[/ {
if (found) exit
if (index($0, "[" ver "]")) { found=1; next }
}
found { print }
' CHANGELOG.md > release_notes.md
# If no changelog section found, use a default message
if [ ! -s release_notes.md ]; then
echo "Release ${{ github.ref_name }}" > release_notes.md
fi
- uses: actions/download-artifact@v5
with:
path: artifacts
- name: Create Release
uses: softprops/action-gh-release@v2
with:
body_path: release_notes.md
prerelease: ${{ contains(github.ref_name, '-rc') }}
files: |
artifacts/INTERSECT-Windows-x64/INTERSECT-${{ github.ref_name }}-Windows-x64.zip
artifacts/INTERSECT-Linux-x64/INTERSECT-${{ github.ref_name }}-Linux-x64.zip
artifacts/INTERSECT-macOS-arm64/INTERSECT-${{ github.ref_name }}-macOS-arm64.zip
artifacts/INTERSECT-macOS-x64/INTERSECT-${{ github.ref_name }}-macOS-x64.zip