-
Notifications
You must be signed in to change notification settings - Fork 1
127 lines (126 loc) · 4.81 KB
/
publish.yml
File metadata and controls
127 lines (126 loc) · 4.81 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
name: Build, Release and Deploy
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
jobs:
# TOD: fix memory out of bounds error
build-export-web:
name: Web Export
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y rsync
- name: 🤖 Setup Godot
uses: chickensoft-games/setup-godot@v1
with:
version: 4.2.2
use-dotnet: false
include-templates: true
- name: Web Build
run: |
mkdir -v -p build/webgl
cd game && godot --headless --verbose --export-release webgl
- uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AIKAMI_PROD }}'
channelId: live
projectId: aikami-prod
# TODO: Make itch-publish action work
# Current error: creating build on remote server: itch.io API error (400): /wharf/builds: invalid target
# - uses: KikimoraGames/itch-publish@v0.0.3
# with:
# butlerApiKey: ${{secrets.BUTLER_API_KEY}}
# gameData: ./build/webgl
# itchUsername: ${{env.ITCH_USERNAME}}
# itchGameId: ${{ env.ITCH_GAME_ID }}
# buildChannel: webgl
# buildNumber: ${{ needs.version.outputs.version_hash }}
build:
strategy:
matrix:
config:
- { os: ubuntu-latest, platform: linux }
- { os: ubuntu-latest, platform: windows }
- { os: macos-latest, platform: macos }
runs-on: ${{ matrix.config.os }}
name: Build for ${{ matrix.config.platform }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 🤖 Setup Godot
uses: chickensoft-games/setup-godot@v1
with:
version: 4.2.2
use-dotnet: false
include-templates: true
- name: Setup Xcode
if: matrix.config.platform == 'macos'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest
- name: Build Game
run: |
mkdir -v -p build/${{ matrix.config.platform }}
cd game && godot --headless --verbose --export-release ${{ matrix.config.platform }}
- name: Archive files
if: matrix.config.platform != 'macos'
run: |
cd build/${{ matrix.config.platform }}
zip -r aikami-${{ matrix.config.platform }}.zip .
- name: Archive Production Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.platform }}
path: ./build/${{ matrix.config.platform }}/aikami-${{ matrix.config.platform }}.zip
release:
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Download All Artifacts
uses: actions/download-artifact@v4
with:
path: build
- name: Release
id: create-release
uses: softprops/action-gh-release@v2
with:
files: build/**/*.zip
token: ${{ secrets.GH_TOKEN }}
- name: Set Download URLs
run: |
echo "Release output: ${{ toJson(steps.create-release.outputs) }}"
deploy-landing-page:
needs: [release]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install Astro Landing Page Dependencies
run: |
cd landing-page
bun install
- name: Build Astro Landing Page
run: |
cd landing-page
bun run build
env:
RELEASE_TAG: ${{ github.ref_name }}
- name: Deploy Astro Landing Page to Firebase
uses: FirebaseExtended/action-hosting-deploy@v0
with:
repoToken: '${{ secrets.GITHUB_TOKEN }}'
entryPoint: 'landing-page'
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_AIKAMI_PROD }}'
channelId: live
projectId: aikami-prod