-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (74 loc) · 2.41 KB
/
deploy.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
on:
workflow_dispatch:
env:
GODOT_VERSION: 3.3.4
FILE_NAME: PixelInterface
ITCHIO_GAME: godot-pixel-interface
ITCHIO_USERNAME: henrysoftware
BUTLER_API_KEY: ${{secrets.BUTLER_API_KEY}}
jobs:
deploy:
runs-on: ubuntu-latest
container:
image: barichello/godot-ci:4.1.1
strategy:
matrix:
include:
- channel: windows
type: Windows Desktop
file: $FILE_NAME
ext: exe
# - channel: linux
# type: Linux/X11
# file: $FILE_NAME
# ext: x86_64
# - channel: mac
# type: macOS
# file: $FILE_NAME
# ext: zip
- channel: web
type: Web
file: index
ext: html
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/upload-artifact@v1
if: ${{matrix.channel == 'web'}}
with:
name: source
path: ./
- uses: actions/download-artifact@v3
if: ${{matrix.channel == 'web'}}
with:
name: source
path: ./source
- name: export
run: |
mkdir -v -p ~/.local/share/godot/templates
mv /root/.local/share/godot/templates/$GODOT_VERSION.stable ~/.local/share/godot/templates/$GODOT_VERSION.stable
mkdir -v -p ./build/${{matrix.channel}}
godot -v --export "${{matrix.type}}" ./build/${{matrix.channel}}/${{matrix.file}}.${{matrix.ext}}
- name: rsync
if: ${{matrix.channel == 'web'}}
run: apt-get update && apt-get install -y rsync
- uses: JamesIves/github-pages-deploy-action@releases/v4
if: ${{matrix.channel == 'web'}}
with:
branch: gh-pages
folder: ./build/${{matrix.channel}}
- uses: actions/upload-artifact@v1
with:
name: ${{matrix.channel}}
path: ./build/${{matrix.channel}}
- name: butler
run: |
apt-get update && apt-get install -y curl
curl -L -o ./butler.zip https://broth.itch.ovh/butler/linux-amd64/LATEST/archive/default
unzip ./butler.zip
chmod +x ./butler
./butler push --if-changed ./build/${{matrix.channel}} $ITCHIO_USERNAME/$ITCHIO_GAME:${{matrix.channel}}
- name: butler source
if: ${{matrix.channel == 'web'}}
run: ./butler push --if-changed ./source $ITCHIO_USERNAME/$ITCHIO_GAME:source