-
-
Notifications
You must be signed in to change notification settings - Fork 49
163 lines (159 loc) · 5.48 KB
/
push-export.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
name: "Push Export"
on:
push:
branches:
- main
# - "feature/**"
env:
GODOT_VERSION: 4.2.1
EXPORT_NAME: godot-game-template
ITCH_IO: false #set to true if you want to enable automatic itch.io deploy
jobs:
export-windows:
if: true
name: Windows Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Windows Build
run: |
mkdir -v -p builds/windows
godot --headless --export-release "Windows Desktop" ./builds/windows/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: builds/windows
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/windows
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: windows
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-linux:
if: true
name: Linux Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Linux Build
run: |
mkdir -v -p builds/linux
godot -v --headless --export-release "Linux/X11" ./builds/linux/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: builds/linux
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/linux
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: linux
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-web:
if: true
name: Web Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Web Build
run: |
mkdir -v -p builds/web
godot -v --headless --export-release "Web" ./builds/web/index.html
- name: Add COI Service Worker
run: |
wget https://github.com/gzuidhof/coi-serviceworker/raw/master/coi-serviceworker.min.js -O ./builds/web/coi-serviceworker.min.js
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web
path: builds/web
retention-days: 1
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
- name: Install rsync 📚
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: builds/web # The folder the action should deploy.
- name: Zip Folder
run: zip -r itch.zip builds/web
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: HTML
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip
export-mac:
if: false # currently broken, see https://github.com/crystal-bit/godot-game-template/issues/82
name: Mac Export
runs-on: ubuntu-20.04
container:
image: barichello/godot-ci:4.2.1
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup
run: |
mkdir -v -p ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable/
mv -v /root/.local/share/godot/templates/* ~/.local/share/godot/export_templates/
- name: Mac Build
run: |
mkdir -v -p builds/mac
godot --headless -v --export-release "macOS" ./builds/mac/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac
path: builds/mac
retention-days: 1
- name: Zip Folder
run: zip -r itch.zip builds/mac
- name: Deploy to itch.io
if: ${{ env.ITCH_IO=='true' }}
uses: josephbmanley/butler-publish-itchio-action@master
env:
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_CREDENTIALS }}
CHANNEL: mac
ITCH_GAME: ${{ secrets.ITCH_GAME }}
ITCH_USER: ${{ secrets.ITCH_USER }}
PACKAGE: itch.zip