-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (74 loc) · 2.49 KB
/
Copy pathbuild.yml
File metadata and controls
81 lines (74 loc) · 2.49 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
name: Build and Release Godot Game
on:
push:
branches: [ main ]
tags:
- 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
build_targets:
description: 'Build desktop targets?'
required: false
default: 'true'
deploy_pages:
description: 'Deploy to GitHub Pages?'
required: false
default: 'true'
permissions:
contents: write
pages: write
jobs:
export_game:
if: ${{ github.event_name != 'workflow_dispatch' || github.event.inputs.build_targets == 'true' }}
runs-on: ubuntu-latest
permissions: write-all
name: Export Game (Desktop)
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Export game
id: export
uses: firebelley/godot-export@v6.0.0
with:
godot_executable_download_url: https://github.com/godotengine/godot/releases/download/4.4.1-stable/Godot_v4.4.1-stable_linux.x86_64.zip
godot_export_templates_download_url: https://github.com/godotengine/godot-builds/releases/download/4.4.1-stable/Godot_v4.4.1-stable_export_templates.tpz
relative_project_path: ./
archive_output: true
presets_to_export: 'windows-x86_64, linux-x86_64'
- name: Create release
uses: ncipollo/release-action@v1.14.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
generateReleaseNotes: true
tag: ${{ github.ref_name }}
artifacts: ${{ steps.export.outputs.archive_directory }}/*
export_web:
runs-on: ubuntu-latest
name: Export Web (HTML5)
container:
image: barichello/godot-ci:4.4.1
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
lfs: true
- name: Setup export templates
run: |
mkdir -p ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/4.4.1.stable ~/.local/share/godot/export_templates/4.4.1.stable
- name: Export to HTML5
run: |
mkdir -p build/web
godot --headless --verbose --export-release "web-standalone-pc" "build/web/index.html"
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/web
publish_branch: gh-pages
force_orphan: true
keep_files: false
destination_dir: .
commit_message: 'Deploy Web version from GitHub Actions'