-
-
Notifications
You must be signed in to change notification settings - Fork 44
149 lines (140 loc) · 4.8 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
name: Make Release
on:
workflow_dispatch:
jobs:
build_app:
name: Build Android App
runs-on: ubuntu-latest
defaults:
run:
working-directory: android-app
steps:
- uses: actions/checkout@v4
- run: git pull
- uses: actions/setup-java@v3
with:
java-version: "17"
distribution: "temurin"
cache: gradle
- name: Create relese.jks
run: mkdir ~/.android && echo "$release_jks" | base64 -d > ~/.android/release.jks
env:
release_jks: ${{ secrets.RELEASE_JKS }}
- name: Create keystore.properties
run: echo -e "storeFile=$(ls ~/.android/release.jks)\nstorePassword=${store_pass}\nkeyAlias=${key_alias}\nkeyPassword=${key_pass}\n" > keystore.properties
env:
store_pass: ${{ secrets.STORE_PASS }}
key_alias: ${{ secrets.KEY_ALIAS }}
key_pass: ${{ secrets.KEY_PASS }}
- run: chmod +x gradlew
- run: ./gradlew :app:assembleRelease
- run: ./gradlew :app:signingReport
- name: Checksum
run: cd app/build/outputs/apk/release/ && sha256sum *.apk | tee $(ls *.apk).sha256
- uses: actions/upload-artifact@v4
with:
name: app
path: |
android-app/app/build/outputs/apk/release/*.apk
android-app/app/build/outputs/apk/release/*.sha256
build_server_mfc:
name: Build server-mfc
runs-on: windows-latest
defaults:
run:
working-directory: server-mfc
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
steps:
- uses: actions/checkout@v4
- run: git pull
- uses: microsoft/setup-msbuild@v1
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 10b7a178346f3f0abef60cecd5130e295afd8da4
- run: vcpkg integrate install
- run: vcpkg install asio protobuf spdlog[wchar] wil nlohmann-json
- run: msbuild /m /p:Configuration=Release,Platform=x64
- name: Checksum
run: cd x64/Release/ && sha256sum *.exe | tee $(ls *.exe).sha256
shell: bash
- uses: actions/upload-artifact@v4
with:
name: server-mfc
path: |
server-mfc/x64/Release/*.exe
server-mfc/x64/Release/*.sha256
build_server_core:
name: Build server-core
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
include:
- os: windows-latest
vcpkg_triplet: x64-windows-static-md
cmake_preset: windows-Release
platform: windows
- os: ubuntu-latest
vcpkg_triplet: x64-linux
cmake_preset: linux-Release
platform: linux
runs-on: ${{ matrix.os }}
defaults:
run:
working-directory: server-core
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }}
steps:
- uses: actions/checkout@v4
- run: git pull
- name: Install Linux Deps
run: sudo apt install libpipewire-0.3-dev
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: lukka/get-cmake@latest
- uses: lukka/run-vcpkg@v11
with:
vcpkgGitCommitId: 10b7a178346f3f0abef60cecd5130e295afd8da4
- run: vcpkg integrate install
- run: vcpkg install asio protobuf cxxopts
- run: vcpkg install spdlog[wchar] wil
if: ${{ matrix.os == 'windows-latest' }}
- run: vcpkg install spdlog
if: ${{ matrix.os == 'ubuntu-latest' }}
- uses: lukka/run-cmake@v10
with:
cmakeListsTxtPath: ${{ github.workspace }}/server-core/CMakeLists.txt
configurePreset: ${{ matrix.cmake_preset }}
buildPreset: ${{ matrix.cmake_preset }}
- name: Pack
run: bash pack.sh ${{ matrix.platform }}
- uses: actions/upload-artifact@v4
with:
name: server-core-${{ matrix.platform }}
path: |
server-core/out/install/*.sha256
server-core/out/install/*.tar.gz
server-core/out/install/*.zip
create_release:
name: Create Release
needs: [build_app, build_server_mfc, build_server_core]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- run: git pull
- run: chmod +x ./scripts/get_version.sh
- uses: actions/download-artifact@v4
with:
path: release_bin
- name: Generate release notes
run: 'echo -e "$(cat ./metadata/en-US/changelogs/$(bash ./scripts/get_version.sh -c).txt)" > notes'
env:
app_hash: ${{ needs.build_app.outputs.hash }}
server_hash: ${{ needs.build_server.outputs.hash }}
- name: Create Github Release
run: |
version=$(bash ./scripts/get_version.sh -n)
gh release create "v$version" -d -F notes -t "v$version" release_bin/*/*
env:
GH_TOKEN: ${{ github.token }}