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
143 lines (139 loc) · 5.02 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
name: Release Vector Audio
on:
release:
types: [published]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
echo "RELEASE_VERSION=v`cat VERSION_BETA`" >> $GITHUB_ENV
cat VERSION_BETA > VERSION
- 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 }}
- 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@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
$ver = Get-Content .\VERSION_BETA -Raw
echo $ver
echo "RELEASE_VERSION=v$ver" >> $GITHUB_ENV
type VERSION_BETA > VERSION
type VERSION
echo ${{ env.RELEASE_VERSION }}
- name: Configure cmake
run: |
cmake -S . -B build/ -DVCPKG_BUILD_TYPE=${{ env.BUILD_TYPE }} -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVCPKG_TARGET_TRIPLET=x64-windows
- 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-${{ env.RELEASE_VERSION }}-Installer.exe
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ env.RELEASE_VERSION }}-Installer.exe
build-osx:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Set env (release)
if: github.event.release.prerelease == false
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- name: Set env (pre-release)
if: github.event.release.prerelease == true
run: |
echo "RELEASE_VERSION=v`cat VERSION_BETA`" >> $GITHUB_ENV
cat VERSION_BETA > VERSION
- name: Installing codesign certificates
uses: apple-actions/import-codesign-certs@v2
with:
p12-file-base64: ${{ secrets.APPLE_CERT_DATA }}
p12-password: ${{ secrets.APPLE_CERT_PASSWORD }}
- name: Install native dependencies
run: |
brew install pkg-config
- name: Run build script
run: |
./manual_osx_build.sh 1
mv VectorAudio-Universal.dmg VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg
- name: Release
uses: softprops/action-gh-release@v1
with:
files: VectorAudio-${{ env.RELEASE_VERSION }}-Universal.dmg