forked from dulvui/godot-ios-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
153 lines (131 loc) · 4.79 KB
/
action.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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
name: 'Godot iOS Upload'
description: 'Godot Engine 3.x and 4.x for iOS export and Testflight upload'
branding:
color: white
icon: upload-cloud
inputs:
working-directory:
description: 'The working directory'
required: false
default: '.'
godot-version:
description: 'Godot Engine version'
required: false
default: '4.2.2'
project-name:
description: 'Project name used for xarchive building'
required: true
provision-profile-uuid:
description: 'The uuid of the provisioning profile'
required: true
apple-id-password:
description: 'Apple ID password'
required: true
apple-id-username:
description: 'Apple ID username'
required: true
team-id:
description: 'Apple Developer Team ID'
required: true
runs:
using: "composite"
steps:
- name: Check if running on macOS
if: runner.os != 'macos'
shell: bash
run: exit 1
- name: Cache Godot files
id: cache-godot
uses: actions/cache@v4
with:
path: |
Godot.app
/Users/runner/Library/Application Support/Godot/
key: ${{ runner.os }}-godot-${{ inputs.godot-version }}
- name: Log in to Apple Developer
shell: bash
run: |
xcrun altool --list-providers \
-u ${{ inputs.apple-id-username }} \
-p ${{ inputs.apple-id-password }}
- name: Install Fastlane
shell: bash
run: gem install fastlane -NV
- name: Download and configure Godot Engine linux server and templates
shell: bash
if: steps.cache-godot.outputs.cache-hit != 'true'
run: |
wget -q https://spine-godot.s3.eu-central-1.amazonaws.com/4.2/4.2.2-stable/godot-editor-macos.zip
wget -q https://spine-godot.s3.eu-central-1.amazonaws.com/4.2/4.2.2-stable/spine-godot-templates-4.2-4.2.2-stable.tpz
unzip godot-editor-macos.zip
unzip spine-godot-templates-4.2-4.2.2-stable.tpz -d templates
mkdir -p ~/Library/Application\ Support/Godot/export_templates/${{ inputs.godot-version }}.stable
mv templates/* ~/Library/Application\ Support/Godot/export_templates/${{ inputs.godot-version }}.stable
- name: Godot iOS export
shell: bash
run: ./Godot.app/Contents/MacOS/Godot --headless --path ${{ inputs.working-directory }} --export-release iOS
# Might not need this as we're using cocoapods now
# - name: Resolve package dependencies
# shell: bash
# run: xcodebuild -resolvePackageDependencies
- name: Run admob pod update
shell: bash
run: |
cd ${{inputs.working-directory}}/ios/plugins/poing-godot-admob/scripts
chmod +x update_and_install.sh
./update_and_install.sh
# - name: Build the xarchive using .xcworkspace
# shell: bash
# run: |
# set -eo pipefail
# xcodebuild clean archive \
# -workspace ${{ inputs.project-name }}.xcworkspace \
# -scheme ${{ inputs.project-name }} \
# -configuration "Release" \
# -sdk iphoneos \
# -archivePath "$PWD/build/${{ inputs.project-name }}.xcarchive" \
# -destination "generic/platform=iOS,name=Any iOS Device" \
# -allowProvisioningUpdates \
# CODE_SIGN_STYLE=Automatic \
# CODE_SIGNING_ALLOWED=NO \
# CODE_SIGN_IDENTITY="iOS Distribution" \
# DEVELOPMENT_TEAM="${{ inputs.team-id }}"
# - name: Verify Provisioning Profiles
# shell: bash
# run: |
# ls -la ~/Library/MobileDevice/Provisioning\ Profiles/
# - name: Export .ipa
# shell: bash
# run: |
# set -eo pipefail
# xcodebuild -archivePath "$PWD/build/${{ inputs.project-name }}.xcarchive" \
# -exportOptionsPlist exportOptions.plist \
# -exportPath $PWD/build \
# -allowProvisioningUpdates \
# CODE_SIGN_STYLE=Automatic \
# CODE_SIGNING_ALLOWED=NO \
# DEVELOPMENT_TEAM="${{ inputs.team-id }}" \
# -exportArchive
- name: Fastlane Build and Export
shell: bash
env:
MATCH_APP_IDENTIFIER: "com.slakkedisstudio.rangerquest"
MATCH_TYPE: "adhoc" # Since your profile is for ad hoc distribution
TEAM_ID: "${{ inputs.team-id }}"
run: |
fastlane run match app_identifier:"$MATCH_APP_IDENTIFIER" type:"$MATCH_TYPE" readonly:true --verbose
fastlane build_and_export
- name: Publish the App on TestFlight
shell: bash
if: success()
env:
APPLEID_USERNAME: ${{ inputs.apple-id-username }}
APPLEID_PASSWORD: ${{ inputs.apple-id-password }}
run: |
xcrun altool \
--upload-app \
-t ios \
-f $PWD/build/*.ipa \
-u "${{ inputs.apple-id-username }}" \
-p "${{ inputs.apple-id-password }}" \
--verbose