generated from MechanicalFlower/godot-template
-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (58 loc) · 1.94 KB
/
release-packaging.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
name: Release Packaging
on:
push:
branches: [main]
workflow_dispatch:
jobs:
release-packaging:
runs-on: ubuntu-20.04
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- platform: windows
output: RootedShadow.exe
preset: Windows Desktop
- platform: linux
output: RootedShadow.x86_64
preset: Linux/X11
- platform: web
output: index.html
preset: HTML5
- platform: mac
output: RootedShadow.zip
preset: Mac OSX
name: ${{ matrix.preset }} Export
steps:
- uses: actions/checkout@v3
- name: Setup Versions Vars
run: |
echo "game_version=$(cat .version)" >> $GITHUB_ENV
echo "godot_version=$(cat .godot_version)" >> $GITHUB_ENV
./bump_version.sh
- name: Export RootedShadow
uses: ./.github/actions/export-game
with:
platform: ${{ matrix.platform }}
output: ${{ matrix.output }}
preset: ${{ matrix.preset }}
version: ${{ env.game_version }}
godot_version: ${{ env.godot_version }}
- name: Upload artifact
uses: ./.github/actions/upload-artifact
with:
name: RootedShadow-${{ matrix.platform }}-v${{ env.version }}
path: build/${{ matrix.platform }}
# Installing rsync is needed in order to deploy to GitHub Pages. Without it, the build will fail.
- name: Install rsync
if: ${{ matrix.platform == 'web' }}
run: |
apt-get update && apt-get install -y rsync
- name: Deploy to GitHub Pages
if: ${{ matrix.platform == 'web' }}
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: build/web # The folder the action should deploy.