-
-
Notifications
You must be signed in to change notification settings - Fork 2
127 lines (107 loc) · 3.7 KB
/
example-export-project.yml
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: Export Example Project
on:
workflow_call:
inputs:
with-codesign:
type: boolean
default: false
# Make sure jobs cannot overlap.
concurrency:
group: export-${{ github.ref }}-example-project
cancel-in-progress: true
env:
GODOT_VERSION: "4.3.0-stable"
jobs:
export-publish:
strategy:
fail-fast: false
matrix:
include:
- platform: linux
arch: x86_64
preset: "Linux - x86_64"
output: "gdsion-example.x86_64"
app-name: "gdsion-example.x86_64"
runs-on: ubuntu-latest
- platform: macos
arch: universal
preset: "macOS - Universal"
output: "gdsion-example.zip"
app-name: "GDSiON Example Project.app"
runs-on: macos-latest
- platform: windows
arch: x86_64
preset: "Windows - x86_64"
output: "gdsion-example.exe"
app-name: "gdsion-example.exe"
runs-on: windows-latest
- platform: windows
arch: x86_32
preset: "Windows - x86_32"
output: "gdsion-example.exe"
app-name: "gdsion-example.exe"
runs-on: windows-latest
name: Export the example project (${{ matrix.preset }})
runs-on: ${{ matrix.runs-on }}
steps:
- uses: actions/checkout@v4
# Set up prerequisites.
- name: Install Godot ${{ env.GODOT_VERSION }}
uses: chickensoft-games/setup-godot@v2
with:
version: ${{ env.GODOT_VERSION }}
use-dotnet: false
include-templates: true
- name: Verify Godot
shell: bash
run: |
godot --version
- name: Download GDSiON artifacts
uses: actions/download-artifact@v4
with:
path: example/bin
pattern: libgdsion-*
merge-multiple: true
# Export the project.
- name: Export the example project
id: export-project-step
uses: ./.github/actions/export-godot-project
with:
platform: ${{ matrix.platform }}
arch: ${{ matrix.arch }}
preset: ${{ matrix.preset }}
output: ${{ matrix.output }}
# Codesign if necessary.
- name: Set up codesign environment
if: ${{ inputs.with-codesign }}
uses: ./.github/actions/sign-godot-project
with:
platform: ${{ matrix.platform }}
setup-env: true
apple-cert-base64: ${{ secrets.APPLE_CERT_BASE64 }}
apple-cert-password: ${{ secrets.APPLE_CERT_PASSWORD }}
- name: Sign the exported project
if: ${{ inputs.with-codesign }}
uses: ./.github/actions/sign-godot-project
with:
platform: ${{ matrix.platform }}
codesign: true
directory: ${{ steps.export-project-step.outputs.export-path }}
target-name: ${{ matrix.app-name }}
apple-dev-id: ${{ secrets.APPLE_DEV_ID }}
apple-dev-app-id: ${{ secrets.APPLE_DEV_APP_ID }}
apple-dev-team-id: ${{ secrets.APPLE_DEV_TEAM_ID }}
apple-dev-password: ${{ secrets.APPLE_DEV_PASSWORD }}
# Upload the results.
# This step helps to preserve file permissions.
- name: Tar up the example project
shell: bash
working-directory: "${{ steps.export-project-step.outputs.export-path }}"
run: |
tar -cvf gdsion-example.tar .
- name: Upload the example project
uses: actions/upload-artifact@v4
with:
name: example-project-${{ matrix.platform }}-${{ matrix.arch }}
path: "${{ steps.export-project-step.outputs.export-path }}/gdsion-example.tar"
retention-days: 14