This repository has been archived by the owner on May 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 11
153 lines (149 loc) · 5.6 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
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
name: Release Vector Audio
on:
push:
tags:
- v*
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Release
VECTOR_SECRET: Dev
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Install SFML dependencies
run: |
sudo apt-get update
sudo apt-get install libx11-dev libxrandr-dev libxi-dev libudev-dev libgl1-mesa-dev libxcursor-dev freeglut3-dev pkg-config desktop-file-utils
sudo add-apt-repository universe
sudo apt-get update
sudo apt install libfuse2
- name: Configure cmake
run: |
cmake -S . -B build/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVECTOR_SECRET=${{ env.VECTOR_SECRET }}
- name: Build cmake
run: |
cmake --build build/ --config ${{ env.BUILD_TYPE }}
- name: Bundle Linux
run: |
./bundle_linux.sh libafv_native.so
- name: Rename installer
run: |
mv VectorAudio-x86_64.AppImage VectorAudio-${{ github.ref_name }}-x86_64.AppImage
mv VectorAudio-x86_64.AppImage.zsync VectorAudio-${{ github.ref_name }}-x86_64.AppImage.zsync
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
VectorAudio-${{ github.ref_name }}-x86_64.AppImage
VectorAudio-${{ github.ref_name }}-x86_64.AppImage.zsync
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Configure cmake
run: |
cmake -S . -B build/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVECTOR_SECRET=${{ env.VECTOR_SECRET }}
- name: Build cmake
run: |
cmake --build build/ --config ${{ env.BUILD_TYPE }}
- name: Prepare windows installer
run: |
python collect_licenses.py
mkdir installer
cp resources/*.wav installer/
cp resources/favicon.ico installer/
cp resources/icon_win.png installer/
cp resources/*.ttf installer/
cp resources/airports.json installer/
cp resources/LICENSE.txt installer/
cp build/Release/vector_audio.exe installer/
cp build/Release/*.dll installer/
cp lib/windows/*.dll installer/
cp bundle_windows.nsi installer/install.nsi
- name: Create installer
run: |
cd installer/
makensis install.nsi
- name: Rename installer
run: |
mv installer/VectorAudio-installer.exe VectorAudio-${{ github.ref_name }}-Installer.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ github.ref_name }}-Installer.exe
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install native dependencies
run: |
brew install pkg-config
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Create universal build folder
run: |
mkdir build/
- name: Configure cmake (intel)
run: |
cmake -S . -B build_intel/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_OSX_ARCHITECTURES=x86_64 -DVCPKG_TARGET_TRIPLET=x64-osx
- name: Build cmake (intel)
run: |
cmake --build build_intel/ --config ${{ env.BUILD_TYPE }}
- name: Cleanup intel build
run: |
cp build_intel/vector_audio.app/Contents/MacOS/vector_audio build/vector_audio.intel
rm -rf build_intel/
- name: Configure cmake (arm64)
run: |
cmake -S . -B build_arm64/ -DVCPKG_BUILD_TYPE=release -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_OSX_ARCHITECTURES=arm64 -DVCPKG_TARGET_TRIPLET=arm64-osx
- name: Build cmake (arm64)
run: |
cmake --build build_arm64/ --config ${{ env.BUILD_TYPE }}
- name: Cleanup arm64 build
run: |
cp build_arm64/vector_audio.app/Contents/MacOS/vector_audio build/vector_audio.arm
rm -rf build_arm64/
- name: Create Universal Binary
run: |
lipo -create build/vector_audio.arm build/vector_audio.intel -output build/vector_audio
- name: Bundle OSX
run: |
./bundle_osx.sh
- name: Create DMG
run: |
brew install create-dmg
create-dmg --volname "Vector Audio Installer" --app-drop-link 600 185 --window-size 800 400 --icon "VectorAudio.app" 200 190 "VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg" "build/VectorAudio.app"
- name: Sign DMG
uses: lando/code-sign-action@v2
with:
file: VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg
certificate-data: ${{ secrets.APPLE_CERT_DATA }}
certificate-password: ${{ secrets.APPLE_CERT_PASSWORD }}
apple-team-id: ${{ secrets.APPLE_TEAM_ID }}
options: --deep --timestamp --force
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg