-
Notifications
You must be signed in to change notification settings - Fork 0
191 lines (188 loc) · 5.75 KB
/
release.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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
dot_love:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: bismuthsoft
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#super_rogue.dot_love
- run: |
printf 'DOT_LOVE=%s\n' \
"$(nix eval --raw .#super_rogue.dot_love)/super_rogue.love" \
>> "$GITHUB_OUTPUT"
id: dot_love
- uses: actions/upload-artifact@v4
with:
name: dot_love-${{ github.sha }}
path: ${{ steps.dot_love.outputs.DOT_LOVE }}
if-no-files-found: error
webroot:
needs:
- dot_love # Use pre-built game.love via cachix
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-24.05
- uses: cachix/cachix-action@v15
with:
name: bismuthsoft
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix build .#super_rogue.web.src
- run: |
printf 'WEB_SRC=%s\n' \
"$(nix eval --raw .#super_rogue.web.src)" \
>> "$GITHUB_OUTPUT"
id: web_src
# cf https://github.com/actions/upload-pages-artifact/blob/main/action.yml
- uses: actions/upload-pages-artifact@v3
with:
path: ${{ steps.web_src.outputs.WEB_SRC }}
website:
# cf https://github.com/actions/deploy-pages?tab=readme-ov-file#usage
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs:
- webroot
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
linux:
needs:
- dot_love
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build Linux packages
id: build-linux-packages
uses: love-actions/love-actions-linux@v1
with:
app-name: Super Rogue
bundle-id: top.workinprogress.super-rogue
description: Super Rogue
version-string: "1.0.0"
icon-path: ./src/assets/super_rogue.png
# icon-path: ./.github/build/linux/dev/icon.png
love-package: ./super_rogue.love
# lib-path: ./lib
# share-path: ./share
build-deb: true
product-name: super-rogue
output-folder: ./dist
- uses: actions/upload-artifact@v4
with:
name: dist-linux
path: dist
mac:
if: ${{ false }}
needs:
- dot_love
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build macOS packages
id: build-mac-packages
uses: winny-/love-actions-macos-portable@productivityTweaks
with:
app-name: "Super Rogue"
bundle-id: "top.workinprogress.super_rogue"
copyright: "Copyright © 2023 44100hz & winny All Rights Reserved."
icon-path: ./src/assets/super_rogue.icns
love-ref: "fc3f5ee6209a0aab9a4d381ed5cd99110f9ff2f2"
love-package: ./super_rogue.love
# extra-assets: ./README.md ./license.txt
product-name: "super_rogue"
version-string: "1.0.0"
output-folder: "./dist"
dmg-background-path: ./src/assets/super_rogue.png
dmg-icon-position: "287 313"
dmg-icon-size: "128"
dmg-link-position: "734 313"
dmg-text-size: "12"
# dmg-volume-icon-path: ./assets/macOS/dmg.icns
dmg-volume-name: "super_rogue"
dmg-window-position: "200 120"
dmg-window-size: "1024 604"
- uses: actions/upload-artifact@v4
with:
name: dist-mac
path: dist
windows:
needs:
- dot_love
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- name: Build Windows packages
id: build-windows
uses: love-actions/love-actions-windows@v1
with:
love-package: ./super_rogue.love
icon-path: ./src/assets/super_rogue.ico
# rc-path: ./assets/template.rc
product-name: super_rogue
app-id: ${{ secrets.APP_ID }}
product-website: https://super-rogue.workinprogress.top
installer-languages: English.isl
output-folder: "./dist"
- uses: actions/upload-artifact@v4
with:
name: dist-windows
path: dist
gh_release:
needs:
- windows
- linux
- dot_love
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
name: dot_love-${{ github.sha }}
- uses: actions/download-artifact@v4
with:
name: dist-windows
- uses: actions/download-artifact@v4
with:
name: dist-linux
- run: |
mv super_rogue_x86.zip super_rogue_windows_x86.zip
mv super_rogue_x64.zip super_rogue_windows_x64.zip
- name: Release
uses: softprops/action-gh-release@v2
with:
files: |
super_rogue.love
super_rogue_windows_x86.zip
super_rogue_windows_x64.zip
super_rogue_installer.exe
super-rogue.deb
super-rogue.AppImage