Skip to content

Commit 16f5c59

Browse files
committed
Updated the workflow
1 parent 6121b70 commit 16f5c59

File tree

1 file changed

+52
-26
lines changed

1 file changed

+52
-26
lines changed

.github/workflows/godot-ci.yml

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,36 @@
11
name: "godot-ci export"
22
on:
3-
push:
4-
branches:
5-
- main-(godot-4)
6-
73
workflow_dispatch:
84
inputs:
9-
create_release:
10-
description: 'Deploy a new release to Itch'
11-
default: 'true'
5+
windows:
6+
description: 'Create a Windows release'
7+
required: true
8+
default: true
9+
type: boolean
10+
linux:
11+
description: 'Create a Linux release'
12+
required: true
13+
default: false
14+
type: boolean
15+
web:
16+
description: 'Create a Web release'
17+
required: true
18+
default: true
19+
type: boolean
1220

1321
env:
1422
GODOT_VERSION: 4.4.1
1523
EXPORT_NAME: ${{vars.EXPORT_NAME}}
1624
PROJECT_PATH: .
1725

1826
jobs:
19-
export-windows:
20-
name: Windows Export
27+
export:
28+
name: Export
2129
runs-on: ubuntu-22.04
30+
2231
container:
2332
image: barichello/godot-ci:4.4.1
33+
2434
steps:
2535
- name: Checkout
2636
uses: actions/checkout@v4
@@ -32,18 +42,22 @@ jobs:
3242
mkdir -v -p ~/.config/
3343
mv /root/.config/godot ~/.config/godot
3444
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
45+
3546
- name: Windows Build
47+
if: ${{ inputs.windows == true }}
3648
run: |
3749
mkdir -v -p build/windows
3850
EXPORT_DIR="$(readlink -f build)"
3951
cd $PROJECT_PATH
4052
godot --headless --verbose --export-release "Windows Desktop" "$EXPORT_DIR/windows/$EXPORT_NAME.zip"
41-
- name: Upload Artifact
53+
- name: Upload Windows Artifact
54+
if: ${{ inputs.windows == true }}
4255
uses: actions/upload-artifact@v4
4356
with:
4457
name: windows
4558
path: build/windows
46-
- name: Butler Upload
59+
- name: Butler Windows Upload
60+
if: ${{ inputs.windows == true }}
4761
uses: yeslayla/butler-publish-itchio-action@master
4862
env:
4963
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }}
@@ -52,32 +66,44 @@ jobs:
5266
ITCH_USER: ${{vars.ITCH_USER}}
5367
PACKAGE: build/windows
5468

55-
export-web:
56-
name: Web Export
57-
runs-on: ubuntu-22.04
58-
container:
59-
image: barichello/godot-ci:4.4.1
60-
steps:
61-
- name: Checkout
62-
uses: actions/checkout@v4
63-
with:
64-
lfs: true
65-
- name: Setup
69+
- name: Linux Build
70+
if: ${{ inputs.linux == true }}
6671
run: |
67-
mkdir -v -p ~/.local/share/godot/export_templates/
68-
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
72+
mkdir -v -p build/linux
73+
EXPORT_DIR="$(readlink -f build)"
74+
cd $PROJECT_PATH
75+
godot --headless --verbose --export-release "Linux" "$EXPORT_DIR/linux/$EXPORT_NAME.x86_64"
76+
- name: Upload Linux Artifact
77+
if: ${{ inputs.linux == true }}
78+
uses: actions/upload-artifact@v4
79+
with:
80+
name: linux
81+
path: build/linux
82+
- name: Butler Linux Upload
83+
if: ${{ inputs.linux == true }}
84+
uses: yeslayla/butler-publish-itchio-action@master
85+
env:
86+
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }}
87+
CHANNEL: linux
88+
ITCH_GAME: ${{vars.ITCH_GAME}}
89+
ITCH_USER: ${{vars.ITCH_USER}}
90+
PACKAGE: build/linux
91+
6992
- name: Web Build
93+
if: ${{ inputs.web == true }}
7094
run: |
7195
mkdir -v -p build/web
7296
EXPORT_DIR="$(readlink -f build)"
7397
cd $PROJECT_PATH
7498
godot --headless --verbose --export-release "Web" "$EXPORT_DIR/web/index.html"
75-
- name: Upload Artifact
99+
- name: Upload Web Artifact
100+
if: ${{ inputs.web == true }}
76101
uses: actions/upload-artifact@v4
77102
with:
78103
name: web
79104
path: build/web
80-
- name: Butler Upload
105+
- name: Butler Web Upload
106+
if: ${{ inputs.web == true }}
81107
uses: yeslayla/butler-publish-itchio-action@master
82108
env:
83109
BUTLER_CREDENTIALS: ${{ secrets.BUTLER_API_KEY }}

0 commit comments

Comments
 (0)