1- name : Build & Release
1+ name : Build & Release
22
33on :
44 push :
1818 UASSETTOOL_VERSION : " v1.2.0"
1919
2020jobs :
21- # ── Windows build ───────────────────────────────────────────────── ─
21+ # Windows build ─
2222 build-windows :
2323 runs-on : windows-latest
2424 steps :
4747 name : RivalsSwapper-Windows
4848 path : dist/RivalsSwapper-Windows.zip
4949
50- # ── Linux build ────────────────────────────────────────────────────
50+ # Linux build
5151 build-linux :
5252 runs-on : ubuntu-latest
5353 steps :
9696 name : RivalsSwapper-Linux
9797 path : dist/RivalsSwapper-Linux.tar.gz
9898
99- # ── Create GitHub Release ─────────────────────────────────────────
99+ # Create GitHub Release
100100 release :
101101 needs : [build-windows, build-linux]
102102 runs-on : ubuntu-latest
@@ -132,135 +132,4 @@ jobs:
132132 generate_release_notes : true
133133 files : |
134134 artifacts/RivalsSwapper-Windows.zip
135- artifacts/RivalsSwapper-Linux.tar.gz
136-
137- # ── Windows build ──────────────────────────────────────────────────
138- build-windows :
139- runs-on : windows-latest
140- steps :
141- - uses : actions/checkout@v4
142-
143- - name : Set up Python
144- uses : actions/setup-python@v5
145- with :
146- python-version : " 3.12"
147-
148- - name : Install dependencies
149- run : |
150- python -m pip install --upgrade pip
151- pip install -r requirements.txt
152- pip install pyinstaller
153-
154- # ── Download retoc (Windows) ──
155- - name : Download retoc
156- run : |
157- Invoke-WebRequest -Uri "https://github.com/trumank/retoc/releases/download/${{ env.RETOC_VERSION }}/retoc_cli-x86_64-pc-windows-msvc.zip" -OutFile retoc.zip
158- New-Item -ItemType Directory -Path tools\retoc -Force
159- Expand-Archive -Path retoc.zip -DestinationPath tools\retoc -Force
160-
161- # ── Download UAssetTool (Windows) ──
162- - name : Download UAssetTool
163- run : |
164- Invoke-WebRequest -Uri "https://github.com/XzantGaming/UAssetToolRivals/releases/download/${{ env.UASSETTOOL_VERSION }}/UAssetTool-win-x64.zip" -OutFile uassettool.zip
165- New-Item -ItemType Directory -Path tools\uassettool -Force
166- Expand-Archive -Path uassettool.zip -DestinationPath tools\uassettool -Force
167-
168- - name : Build with PyInstaller
169- run : pyinstaller build.spec --noconfirm --clean
170-
171- - name : Zip release folder
172- run : Compress-Archive -Path dist\RivalsSwapper\* -DestinationPath dist\RivalsSwapper-Windows.zip
173-
174- - name : Upload artifact
175- uses : actions/upload-artifact@v4
176- with :
177- name : RivalsSwapper-Windows
178- path : dist/RivalsSwapper-Windows.zip
179-
180- # ── Linux build ────────────────────────────────────────────────────
181- build-linux :
182- runs-on : ubuntu-latest
183- steps :
184- - uses : actions/checkout@v4
185-
186- - name : Install system dependencies
187- run : |
188- sudo apt-get update
189- sudo apt-get install -y python3-tk
190-
191- - name : Set up Python
192- uses : actions/setup-python@v5
193- with :
194- python-version : " 3.12"
195-
196- - name : Install dependencies
197- run : |
198- python -m pip install --upgrade pip
199- pip install -r requirements.txt
200- pip install pyinstaller
201-
202- # ── Download retoc (Linux) ──
203- - name : Download retoc
204- run : |
205- mkdir -p tools/retoc _retoc_tmp
206- curl -sL "https://github.com/trumank/retoc/releases/download/${{ env.RETOC_VERSION }}/retoc_cli-x86_64-unknown-linux-gnu.tar.xz" | tar -xJ -C _retoc_tmp
207- find _retoc_tmp -type f -name "retoc" -exec cp {} tools/retoc/retoc \;
208- chmod +x tools/retoc/retoc
209- rm -rf _retoc_tmp
210-
211- # ── Download UAssetTool (Linux) ──
212- - name : Download UAssetTool
213- run : |
214- mkdir -p tools/uassettool
215- curl -sL "https://github.com/XzantGaming/UAssetToolRivals/releases/download/${{ env.UASSETTOOL_VERSION }}/UAssetTool-linux-x64.tar.gz" | tar -xz -C tools/uassettool
216- chmod +x tools/uassettool/UAssetTool
217-
218- - name : Build with PyInstaller
219- run : pyinstaller build.spec --noconfirm --clean
220-
221- - name : Archive release folder
222- run : tar -czf dist/RivalsSwapper-Linux.tar.gz -C dist RivalsSwapper
223-
224- - name : Upload artifact
225- uses : actions/upload-artifact@v4
226- with :
227- name : RivalsSwapper-Linux
228- path : dist/RivalsSwapper-Linux.tar.gz
229-
230- # ── Create GitHub Release ─────────────────────────────────────────
231- release :
232- needs : [build-windows, build-linux]
233- runs-on : ubuntu-latest
234- steps :
235- - name : Download Windows artifact
236- uses : actions/download-artifact@v4
237- with :
238- name : RivalsSwapper-Windows
239- path : artifacts
240-
241- - name : Download Linux artifact
242- uses : actions/download-artifact@v4
243- with :
244- name : RivalsSwapper-Linux
245- path : artifacts
246-
247- - name : Determine tag
248- id : tag
249- run : |
250- if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
251- echo "TAG_NAME=${{ inputs.tag_name }}" >> "$GITHUB_OUTPUT"
252- else
253- echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> "$GITHUB_OUTPUT"
254- fi
255-
256- - name : Create GitHub Release
257- uses : softprops/action-gh-release@v2
258- with :
259- tag_name : ${{ steps.tag.outputs.TAG_NAME }}
260- name : Rivals Swapper ${{ steps.tag.outputs.TAG_NAME }}
261- draft : false
262- prerelease : false
263- generate_release_notes : true
264- files : |
265- artifacts/RivalsSwapper-Windows.zip
266- artifacts/RivalsSwapper-Linux.tar.gz
135+ artifacts/RivalsSwapper-Linux.tar.gz
0 commit comments