-
Notifications
You must be signed in to change notification settings - Fork 7
89 lines (77 loc) · 2.44 KB
/
build-demo.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
name: "Export Demo and deploy to Itch.io"
permissions: read-all
on:
workflow_call:
workflow_dispatch:
env:
GODOT_VERSION: 4.3
ITCH_USERNAME: ivorius
ITCH_GAME_ID: numdot-demos
jobs:
# Builds the project.
export-web:
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.3
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
sparse-checkout: 'demo'
sparse-checkout-cone-mode: false
- name: Setup Godot Export Templates
run: |
mkdir -v -p ~/.local/share/godot/export_templates/
mv /root/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable ~/.local/share/godot/export_templates/${{ env.GODOT_VERSION }}.stable
# Clean up the extension files we have here already; we'll be using the files from the release downloaded below.
- name: Clean demo gdextension
working-directory: demo
run: |
rm -rf addons
# Download the relevant NumDot version.
- name: Download Artifact
uses: actions/download-artifact@v4
with:
# TODO Can we automate choosing the run ID?
run-id: 11562444170
name: GDExtension-all
path: demo/addons
github-token: ${{ github.token }}
- name: Web Build
working-directory: demo
run: |
mkdir -v -p build/web
godot --headless --verbose --export-release "Web" build/web/index.html
- name: Upload Web Artifact
uses: actions/upload-artifact@v4
with:
name: web
path: demo/build/web
# Deploys on itch.io.
deploy:
name: Upload to Itch
runs-on: ubuntu-latest
needs: export-web
strategy:
fail-fast: true
matrix:
channel:
- web
steps:
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.channel }}
path: build/${{ matrix.channel }}
# Publishes the build to Itch.io using the butler tool
- name: Publish to Itch.io
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.ITCH_API_KEY }}
gameData: ./build/${{ matrix.channel }}
itchUsername: ${{ env.ITCH_USERNAME }}
itchGameId: ${{ env.ITCH_GAME_ID }}
buildChannel: ${{ matrix.channel }}
buildNumber: ${{ github.run_number }}