-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (163 loc) · 6.17 KB
/
release-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
164
165
166
167
name: "Release Export"
on:
release:
types: [published]
env:
GODOT_VERSION: 4.1.1
APP_VERSION: ${{ github.ref_name }}
EXPORT_NAME: rimidle-${{ github.ref_name }}
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.1.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-${{ github.ref_name }}
godot --headless --export-release "Windows Desktop" ./builds/windows-${{ github.ref_name }}/$EXPORT_NAME.exe
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: windows-${{ github.ref_name }}
path: builds/windows-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/windows-${{ github.ref_name }}
- 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.1.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-${{ github.ref_name }}
godot -v --headless --export-release "Linux/X11" ./builds/linux-${{ github.ref_name }}/$EXPORT_NAME.x86_64
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: linux-${{ github.ref_name }}
path: builds/linux-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/linux-${{ github.ref_name }}
- 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.1.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-${{ github.ref_name }}
godot -v --headless --export-release "Web" ./builds/web-${{ github.ref_name }}/index.html
- name: Add coi-service-worker
run: |
git clone https://github.com/gzuidhof/coi-serviceworker.git
mv coi-serviceworker/coi-serviceworker.js builds/web-${{ github.ref_name }}/coi-serviceworker.js
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: web-${{ github.ref_name }}
path: builds/web-${{ github.ref_name }}
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-${{ github.ref_name }} # The folder the action should deploy.
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/web-${{ github.ref_name }}
- 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.1.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-${{ github.ref_name }}
godot --headless -v --export-release "macOS" ./builds/mac-${{ github.ref_name }}/$EXPORT_NAME.zip
- name: Upload Artifact
uses: actions/upload-artifact@v3
with:
name: mac-${{ github.ref_name }}
path: builds/mac-${{ github.ref_name }}
retention-days: 1
- name: Zip Folder
if: ${{ env.ITCH_IO=='true' }}
run: zip -r itch.zip builds/mac-${{ github.ref_name }}
- 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