| 1 |
name: Package - Windows |
| 2 |
on: |
| 3 |
workflow_dispatch: |
| 4 |
workflow_call: |
| 5 |
|
| 6 |
jobs: |
| 7 |
package: |
| 8 |
name: MINGW64 |
| 9 |
runs-on: windows-2022 |
| 10 |
defaults: |
| 11 |
run: |
| 12 |
shell: msys2 {0} |
| 13 |
steps: |
| 14 |
- name: Setup MSYS2 |
| 15 |
uses: msys2/setup-msys2@v2 |
| 16 |
with: |
| 17 |
msystem: MINGW64 |
| 18 |
update: true |
| 19 |
install: >- |
| 20 |
git |
| 21 |
zip |
| 22 |
base-devel |
| 23 |
mingw-w64-x86_64-toolchain |
| 24 |
mingw-w64-x86_64-scons |
| 25 |
mingw-w64-x86_64-pkgconf |
| 26 |
mingw-w64-x86_64-SDL |
| 27 |
mingw-w64-x86_64-SDL_image |
| 28 |
mingw-w64-x86_64-SDL_mixer |
| 29 |
mingw-w64-x86_64-physfs |
| 30 |
|
| 31 |
- name: Clone Repository |
| 32 |
uses: actions/checkout@v4 |
| 33 |
with: |
| 34 |
path: src |
| 35 |
|
| 36 |
- name: Collect architecture |
| 37 |
id: architecture |
| 38 |
run: | |
| 39 |
printf 'uname_m=%s\n' "$(uname -m)" >> "$GITHUB_OUTPUT" |
| 40 |
|
| 41 |
- name: Configure and Build |
| 42 |
working-directory: src |
| 43 |
run: scons -j`nproc` |
| 44 |
|
| 45 |
- name: Package |
| 46 |
working-directory: src |
| 47 |
run: ./contrib/packaging/windows/build_package.sh -o .. -z '' |
| 48 |
|
| 49 |
- name: Upload Artifact |
| 50 |
uses: actions/upload-artifact@v4 |
| 51 |
with: |
| 52 |
name: "DXX-Rebirth-Windows-${{ steps.architecture.outputs.uname_m }}" |
| 53 |
path: 'D*X-Rebirth/' |