Skip to content

Commit 7687a29

Browse files
Create deploy.yml
1 parent 444f780 commit 7687a29

File tree

1 file changed

+111
-0
lines changed

1 file changed

+111
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Deploy
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
export-builds:
10+
runs-on: ubuntu-latest
11+
name: Export Builds
12+
steps:
13+
- name: checkout
14+
uses: actions/checkout@v2.3.1
15+
with:
16+
fetch-depth: 0
17+
- name: export game
18+
uses: firebelley/godot-export@v3.0.0
19+
with:
20+
godot_executable_download_url: https://downloads.tuxfamily.org/godotengine/3.4.4/Godot_v3.4.4-stable_linux_headless.64.zip
21+
godot_export_templates_download_url: https://downloads.tuxfamily.org/godotengine/3.4.4/Godot_v3.4.4-stable_export_templates.tpz
22+
relative_project_path: ./
23+
create_release: false
24+
use_preset_export_path: true
25+
- name: upload linux artifact
26+
uses: actions/upload-artifact@v3
27+
with:
28+
name: linux
29+
path: build/linux/linux/*
30+
- name: upload windows artifact
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: windows
34+
path: build/windows/windows/*
35+
- name: upload html5 artifact
36+
uses: actions/upload-artifact@v3
37+
with:
38+
name: html5
39+
path: build/html5/html5/*
40+
41+
deploy-itch:
42+
if: github.repository == 'MenacingMecha/godot-n64-shader-demo'
43+
needs: [export-builds]
44+
runs-on: ubuntu-latest
45+
strategy:
46+
fail-fast: true
47+
matrix:
48+
channel:
49+
- linux
50+
- windows
51+
- html5
52+
name: Deploy -> itch.io:${{matrix.channel}}
53+
env:
54+
ITCH_USERNAME: MenacingMecha
55+
ITCH_GAME_ID: godot-n64-shader-demo
56+
steps:
57+
- uses: actions/download-artifact@v3.0.0
58+
with:
59+
name: ${{matrix.channel}}
60+
- uses: KikimoraGames/itch-publish@v0.0.3
61+
with:
62+
butlerApiKey: ${{secrets.BUTLER_CREDENTIALS}}
63+
gameData: ./
64+
itchUsername: ${{env.ITCH_USERNAME}}
65+
itchGameId: ${{env.ITCH_GAME_ID}}
66+
buildChannel: ${{matrix.channel}}
67+
buildNumber: ${{github.ref_name}}
68+
69+
create-release-page:
70+
runs-on: ubuntu-latest
71+
name: Create Release Page
72+
permissions:
73+
contents: write
74+
steps:
75+
- name: Create release page
76+
uses: softprops/action-gh-release@v0.1.14
77+
with:
78+
token: ${{secrets.GITHUB_TOKEN}}
79+
draft: true
80+
generate_release_notes: true
81+
82+
add-release-artifacts:
83+
needs: [export-builds, create-release-page]
84+
runs-on: ubuntu-latest
85+
name: Add Release Artifact -> ${{matrix.channel}}
86+
strategy:
87+
fail-fast: true
88+
matrix:
89+
channel:
90+
- linux
91+
- windows
92+
- html5
93+
permissions:
94+
contents: write
95+
env:
96+
ARTIFACT_FILENAME: ${{github.event.repository.name}}_${{matrix.channel}}_${{github.ref_name}}.zip
97+
steps:
98+
- name: Download artifact
99+
uses: actions/download-artifact@v3.0.0
100+
with:
101+
name: ${{matrix.channel}}
102+
- name: Archive release artifact
103+
uses: thedoctor0/zip-release@main
104+
with:
105+
filename: ${{env.ARTIFACT_FILENAME}}
106+
- name: Upload release artifact to release page
107+
uses: softprops/action-gh-release@v0.1.14
108+
with:
109+
token: ${{secrets.GITHUB_TOKEN}}
110+
fail_on_unmatched_files: true
111+
files: ${{env.ARTIFACT_FILENAME}}

0 commit comments

Comments
 (0)