1- name : Build
2- on :
3- push :
4- branches :
5- - main
6- - new-mod-api
1+ name : Build and Deploy
2+ on : [push, pull_request]
73
84jobs :
95 android :
106 name : Android
117 runs-on : ubuntu-latest
128 steps :
139 - name : Checkout sources
14- uses : actions/checkout@v4
10+ uses : actions/checkout@v5
1511 with :
1612 fetch-depth : 0
1713 submodules : recursive
18- - name : Fetch YaPB Graphs from DB
19- run : scripts/yapb_graph_dl.sh
2014 - name : Setup Java
2115 uses : actions/setup-java@v4
2216 with :
2317 java-version : 17
2418 distribution : ' temurin'
2519 cache : gradle
26- - name : Setup Android SDK
27- uses : android-actions/setup-android@v3
28- - name : Build
29- run : ./gradlew assembleCi
30- working-directory : android
31- - name : Sign APK
32- uses : r0adkll/sign-android-release@v1
33- with :
34- releaseDirectory : android/app/build/outputs/apk/ci
35- signingKeyBase64 : ${{ secrets.SIGNING_KEY }}
36- alias : ${{ secrets.ALIAS }}
37- keyStorePassword : ${{ secrets.KEY_STORE_PASSWORD }}
38- keyPassword : ${{ secrets.KEY_PASSWORD }}
20+ - name : Build and Sign APK
3921 env :
40- BUILD_TOOLS_VERSION : " 34.0.0"
22+ KEYSTORE_FILE_PATH : ${{ github.workspace }}/signingkey.jks
23+ KEYSTORE_PASSWORD : ${{ secrets.KEY_STORE_PASSWORD }}
24+ KEY_ALIAS : ${{ secrets.ALIAS }}
25+ KEY_PASSWORD : ${{ secrets.KEY_PASSWORD }}
26+ run : |
27+ echo "${{ secrets.SIGNING_KEY }}" | base64 --decode > ${{ env.KEYSTORE_FILE_PATH }}
28+ ./gradlew assembleGitContinuous
29+ mv app/build/outputs/apk/git/continuous/app-git-continuous.apk CS16Client-Android.apk
30+ working-directory : android
4131 - name : Upload artifacts
4232 uses : actions/upload-artifact@v4
4333 with :
4434 name : Android
45- path : android/app/build/outputs/apk/ci/app-ci-unsigned-signed .apk
35+ path : android/CS16Client-Android .apk
4636 psvita :
4737 name : PS Vita
4838 runs-on : ubuntu-latest
4939 steps :
5040 - name : Checkout sources
51- uses : actions/checkout@v4
41+ uses : actions/checkout@v5
5242 with :
5343 fetch-depth : 0
5444 submodules : recursive
5545 - name : Install dependencies
5646 run : |
5747 sudo apt-get update
5848 sudo apt-get install libatomic1 libgcc-s1 \
59- libstdc++6 gcc-multilib g++-multilib cmake \
49+ libstdc++6 gcc-multilib g++-multilib \
6050 ninja-build libfontconfig-dev
6151 - name : Setup VitaSDK
6252 run : |
63- chmod +x scripts/psvita_sdk.sh
6453 scripts/psvita_sdk.sh
6554 echo "VITASDK=/usr/local/vitasdk" >> $GITHUB_ENV
6655 echo "$VITASDK/bin" >> $GITHUB_PATH
67- - name : Create build environment
68- run : cmake -E make_directory ${{github.workspace}}/build
6956 - name : Configure CMake
70- working-directory : build
71- run : cmake .. --preset "psvita-release"
72- - name : Build
73- working-directory : build
74- run : cmake --build . --parallel $(nproc)
57+ run : cmake --preset "psvita-release"
7558 - name : Generate configuration files
7659 working-directory : build
77- run : |
78- chmod +x ${{ github.workspace }}/scripts/psvita_generate_configs.sh
79- ${{ github.workspace }}/scripts/psvita_generate_configs.sh
80- - name : Package
81- run : cpack --config CPackConfig.cmake
60+ run : ${{ github.workspace }}/scripts/psvita_generate_configs.sh
61+ - name : Build and Package
8262 working-directory : build
63+ run : |
64+ cmake --build . --parallel $(nproc)
65+ cpack --config CPackConfig.cmake
8366 - name : Upload artifacts
8467 uses : actions/upload-artifact@v4
8568 with :
@@ -94,25 +77,20 @@ jobs:
9477 fail-fast : false
9578 steps :
9679 - name : Checkout sources
97- uses : actions/checkout@v4
80+ uses : actions/checkout@v5
9881 with :
9982 fetch-depth : 0
10083 submodules : recursive
10184 - name : Setup Visual Studio
10285 uses : ilammy/msvc-dev-cmd@v1
10386 with :
10487 arch : ${{ matrix.arch }}
105- - name : Configure project
88+ - name : Configure
10689 run : cmake --preset "win32-ci-${{ matrix.arch }}"
107- - name : Run appversion.sh
108- run : regamedll/version/appversion.sh "${{ github.workspace }}/3rdparty/ReGameDLL_CS"
109- shell : bash
110- working-directory : 3rdparty/ReGameDLL_CS
111- - name : Build
112- run : cmake --build .
113- working-directory : build
114- - name : Package
115- run : cpack --config CPackConfig.cmake
90+ - name : Build and Package
91+ run : |
92+ cmake --build .
93+ cpack --config CPackConfig.cmake
11694 working-directory : build
11795 - name : Upload artifacts
11896 uses : actions/upload-artifact@v4
@@ -137,15 +115,14 @@ jobs:
137115 sudo dpkg --add-architecture i386
138116 sudo apt-get update
139117 sudo apt-get install libatomic1:i386 libgcc-s1:i386 \
140- libstdc++6:i386 gcc-multilib g++-multilib cmake \
118+ libstdc++6:i386 gcc-multilib g++-multilib \
141119 ninja-build libfontconfig-dev:i386 libfontconfig-dev
142- - name : Configure project
120+ - name : Configure
143121 run : cmake --preset "linux-ci-${{ matrix.arch }}"
144- - name : Build
145- run : cmake --build .
146- working-directory : build
147- - name : Package
148- run : cpack --config CPackConfig.cmake
122+ - name : Build and Package
123+ run : |
124+ cmake --build .
125+ cpack --config CPackConfig.cmake
149126 working-directory : build
150127 - name : Upload artifacts
151128 uses : actions/upload-artifact@v4
@@ -155,38 +132,23 @@ jobs:
155132 release :
156133 name : Release
157134 runs-on : ubuntu-latest
135+ if : github.ref == 'refs/heads/main'
158136 needs : [android, windows, linux, psvita]
159137 steps :
160138 - name : Fetch artifacts
161139 uses : actions/download-artifact@v4
162140 - name : Remove old release
163- uses : ClementTsang/delete-tag-and-release@v0.3.1
141+ run : |
142+ TAG_NAME=${{ github.ref_name == 'main' && 'continuous' || format('continuous-{0}', github.ref_name) }}
143+ echo "TAG_NAME=$TAG_NAME" >> $GITHUB_ENV
144+ if gh release list | grep -q -e "$TAG_NAME"; then
145+ gh release delete "$TAG_NAME" --yes --cleanup-tag --repo ${{ github.repository }}
146+ fi
164147 env :
165148 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
166- with :
167- tag_name : continuous
168- delete_release : true
169- repo : ${{ env.GITHUB_REPOSITORY }}
170- - name : Prepare release
171- run : |
172- mv Android/app-ci-unsigned-signed.apk CS16Client-Android.apk
173-
174- mv */*.zip .
175- mv */*.tar.gz .
176-
177- sleep 60s
178- # - name: Purge artifacts
179- # uses: geekyeggo/delete-artifact@v2
180- # with:
181- # name: "*"
182149 - name : Upload new release
183- uses : svenstaro/upload-release-action@v2
184- with :
185- repo_name : ${{ env.GITHUB_REPOSITORY }}
186- repo_token : ${{ secrets.GITHUB_TOKEN }}
187- file_glob : true
188- file : CS16Client-*
189- tag : continuous
190- overwrite : true
191- prerelease : true
192- release_name : CS16Client development build
150+ run : |
151+ gh release create ${{ env.TAG_NAME }} --title "CS16Client development build" --prerelease */CS16Client-* \
152+ --repo ${{ github.repository }}
153+ env :
154+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
0 commit comments