Repository navigation
96 lines (81 loc) · 2.72 KB
/
Copy pathrelease.yml
File metadata and controls
96 lines (81 loc) · 2.72 KB
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
name: Build and Deploy
on:
push:
tags:
- 'v*' # Only runs if pushing a tag
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
tests:
name: Evaluate on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# Don't cancel other OS runners if one fails.
fail-fast: false
matrix:
os: [ubuntu-latest] # Runs only on Linux, still cross-compiles all builds
defaults:
run:
# Use bash shells on all platforms.
shell: bash
steps:
- uses: actions/checkout@v4
name: Checkout
- uses: chickensoft-games/setup-godot@v2
name: Setup Godot
with:
version: 4.7.2
use-dotnet: false
# Include the Godot Export Templates (the default is false).
include-templates: true
- name: Verify Setup
run: |
godot --version
- name: Configure Godot Template Path
run: |
mkdir -p ~/.config/godot/
echo "export_templates_path = \"$GODOT_TEMPLATES_PATH\"" >> ~/.config/godot/editor_settings-4.tres
- name: Initial Godot Asset Import
run: |
godot --headless --path src --editor --quit || exit 0
- name: Export Game Executables
run: |
mkdir -p src/build/windows src/build/linux src/build/web
godot --headless --path src --export-release "Windows Desktop" build/windows/game.exe
godot --headless --path src --export-release "Linux x86_64" build/linux/game.x86_64
godot --headless --path src --export-release "Web" build/web/index.html
- name: Archive and build packages
run: |
(cd src/build/web && zip -r ../../../web-build.zip .)
(cd src/build/linux && zip -r ../../../linux-build.zip .)
mv src/build/windows/game.exe "$GITHUB_WORKSPACE/windows-build.exe"
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'src/build/web'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
- name: Publish to GitHub Releases
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
windows-build.exe
linux-build.zip
web-build.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish to Itch.io
uses: KikimoraGames/itch-publish@v0.0.3
with:
butlerApiKey: ${{ secrets.BUTLER_API_KEY }}
gameData: ./src/build/web
itchUsername: tyleruploads
itchGameId: codeware
buildChannel: html5