-
Notifications
You must be signed in to change notification settings - Fork 12
112 lines (107 loc) · 3.15 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
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
name: Deploy
on:
push:
tags:
- 'v*'
jobs:
export-builds:
runs-on: ubuntu-latest
name: Export Builds
steps:
- name: checkout
uses: actions/[email protected]
with:
fetch-depth: 0
- name: export game
uses: firebelley/[email protected]
with:
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_linux.x86_64.zip
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/4.0/Godot_v4.0-stable_export_templates.tpz
relative_project_path: ./
create_release: false
use_preset_export_path: true
use_godot_4: true
- name: upload linux artifact
uses: actions/upload-artifact@v3
with:
name: linux
path: build/linux/linux/*
- name: upload windows artifact
uses: actions/upload-artifact@v3
with:
name: windows
path: build/windows/windows/*
- name: upload html5 artifact
uses: actions/upload-artifact@v3
with:
name: html5
path: build/html5/html5/*
deploy-itch:
if: github.repository == 'MenacingMecha/godot-n64-shader-demo'
needs: [export-builds]
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
channel:
- linux
- windows
- html5
name: Deploy -> itch.io:${{matrix.channel}}
env:
ITCH_USERNAME: MenacingMecha
ITCH_GAME_ID: godot-n64-shader-demo
steps:
- uses: actions/[email protected]
with:
name: ${{matrix.channel}}
- uses: KikimoraGames/[email protected]
with:
butlerApiKey: ${{secrets.BUTLER_CREDENTIALS}}
gameData: ./
itchUsername: ${{env.ITCH_USERNAME}}
itchGameId: ${{env.ITCH_GAME_ID}}
buildChannel: v2.x_${{matrix.channel}}
buildNumber: ${{github.ref_name}}
create-release-page:
runs-on: ubuntu-latest
name: Create Release Page
permissions:
contents: write
steps:
- name: Create release page
uses: softprops/[email protected]
with:
token: ${{secrets.GITHUB_TOKEN}}
draft: true
generate_release_notes: true
add-release-artifacts:
needs: [export-builds, create-release-page]
runs-on: ubuntu-latest
name: Add Release Artifact -> ${{matrix.channel}}
strategy:
fail-fast: true
matrix:
channel:
- linux
- windows
- html5
permissions:
contents: write
env:
ARTIFACT_FILENAME: ${{github.event.repository.name}}_${{matrix.channel}}_${{github.ref_name}}.zip
steps:
- name: Download artifact
uses: actions/[email protected]
with:
name: ${{matrix.channel}}
- name: Archive release artifact
uses: thedoctor0/zip-release@main
with:
filename: ${{env.ARTIFACT_FILENAME}}
- name: Upload release artifact to release page
uses: softprops/[email protected]
with:
token: ${{secrets.GITHUB_TOKEN}}
fail_on_unmatched_files: true
files: ${{env.ARTIFACT_FILENAME}}