-
Notifications
You must be signed in to change notification settings - Fork 62
104 lines (89 loc) · 2.6 KB
/
build.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
name: Snes9x GX Build
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
strategy:
matrix:
image: ["Wii", "GameCube"]
container: devkitpro/devkitppc:latest
steps:
- name: Checkout snes9xgx repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Build Wii
if: ${{ matrix.image == 'Wii' }}
run: |
make -f Makefile.wii -j2
- name: Copy Wii artifacts
if: ${{ matrix.image == 'Wii' }}
run: |
mkdir -p dist/Snes9xGX/apps/snes9xgx
mkdir -p dist/Snes9xGX/snes9xgx/roms
mkdir dist/Snes9xGX/snes9xgx/cheats
mkdir dist/Snes9xGX/snes9xgx/saves
touch dist/Snes9xGX/snes9xgx/roms/romsdir
touch dist/Snes9xGX/snes9xgx/cheats/cheatsdir
touch dist/Snes9xGX/snes9xgx/saves/savesdir
cp hbc/* dist/Snes9xGX/apps/snes9xgx/
cp executables/snes9xgx-wii.dol dist/Snes9xGX/apps/snes9xgx/boot.dol
- name: Upload Wii artifacts
uses: actions/upload-artifact@v4
if: ${{ matrix.image == 'Wii' }}
with:
name: Snes9xGX
path: |
dist/Snes9xGX/
- name: Build GameCube
if: ${{ matrix.image == 'GameCube' }}
run: |
make -f Makefile.gc -j2
- name: Copy GameCube artifact
if: ${{ matrix.image == 'GameCube' }}
run: |
mkdir -p dist/Snes9xGX-GameCube
cp executables/snes9xgx-gc.dol dist/Snes9xGX-GameCube/
- name: Upload GameCube artifact
uses: actions/upload-artifact@v4
if: ${{ matrix.image == 'GameCube' }}
with:
name: Snes9xGX-GameCube
path: |
dist/Snes9xGX-GameCube/
release:
name: Release
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/master'
steps:
- name: Checkout snes9xgx repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
path: dist
- name: Re-zip artifacts
run: |
cd dist
rm -r Snes9xGX/snes9xgx/cheats/*
rm -r Snes9xGX/snes9xgx/roms/*
rm -r Snes9xGX/snes9xgx/saves/*
zip -r Snes9xGX.zip Snes9xGX
zip -r Snes9xGX-GameCube.zip Snes9xGX-GameCube
- name: Update Git Tag
run: |
git tag -f Pre-release
git push -f origin Pre-release
- name: Create Release
uses: ncipollo/release-action@v1
with:
prerelease: true
allowUpdates: true
removeArtifacts: true
replacesArtifacts: false
tag: Pre-release
artifacts: "dist/*.zip"