-
-
Notifications
You must be signed in to change notification settings - Fork 4
113 lines (102 loc) · 2.88 KB
/
autobuild.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
name: Automatic Builds
on:
push:
branches:
- main
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- name: Install Flatpak and SDK
run: |
sudo apt update
sudo apt install flatpak flatpak-builder -y
sudo flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
sudo flatpak install flathub org.freedesktop.Platform//21.08 org.freedesktop.Sdk//21.08 -y
- name: Checkout
uses: actions/checkout@v1
- name: Compile
run: |
git config --global protocol.file.allow always
make flatpak -j$(nproc)
- name: Upload
uses: actions/upload-artifact@v2
with:
name: rokuyon-linux
path: rokuyon.flatpak
build-mac:
runs-on: macos-latest
steps:
- name: Install wxWidgets and PortAudio
run: brew install wxmac portaudio
- name: Checkout
uses: actions/checkout@v1
- name: Compile
run: |
make -j$(sysctl -n hw.logicalcpu)
./mac-bundle.sh --dmg
- name: Upload
uses: actions/upload-artifact@v2
with:
name: rokuyon-mac
path: rokuyon.dmg
build-windows:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: MINGW64
update: true
- name: Install build tools, wxWidgets, and PortAudio
run: pacman -S mingw-w64-x86_64-{gcc,pkg-config,wxWidgets,portaudio,jbigkit} make --noconfirm
shell: msys2 {0}
- name: Compile
run: |
make -j$(nproc)
strip rokuyon.exe
shell: msys2 {0}
working-directory: ${{ github.workspace }}
- name: Upload
uses: actions/upload-artifact@v2
with:
name: rokuyon-windows
path: rokuyon.exe
build-switch:
runs-on: ubuntu-latest
container: devkitpro/devkita64:latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Compile
run: make switch -j$(nproc)
- name: Upload
uses: actions/upload-artifact@v2
with:
name: rokuyon-switch
path: rokuyon.nro
update-release:
runs-on: ubuntu-latest
needs: [build-linux, build-mac, build-windows, build-switch]
steps:
- name: Delete old release
uses: dev-drprasad/delete-tag-and-release@v0.2.1
with:
delete_release: true
tag_name: release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get artifacts
uses: actions/download-artifact@v2
- name: Package artifacts
run: for i in ./*; do zip -r -j ${i}.zip $i; done
- name: Create new release
uses: ncipollo/release-action@v1
with:
name: Rolling Release
body: These are automatically updated builds of the latest commit.
artifacts: "*.zip"
tag: release
token: ${{ secrets.GITHUB_TOKEN }}