Skip to content

Commit d9345cc

Browse files
observableobjectVincent Frascello
authored andcommitted
Updated Readme and Bug Fixes
1 parent 5af334b commit d9345cc

File tree

2 files changed

+27
-23
lines changed

2 files changed

+27
-23
lines changed

Readme.MD

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# XCode-Deploy 1.0
1+
# XCode-Deploy 1.11
22
This action will archive, export, and upload your project or workspace to App Store Connect (TestFlight).
33
It is designed to run on a containerized VM, such as a GitHub Hosted Runner.
44
If self-hosting, some of these steps may be unnecessary or redundant.
@@ -50,7 +50,8 @@ You can generate one of these by doing a local export in XCode and then copy it
5050

5151
## Sample Usage
5252
```yml
53-
- uses: vfrascello/xcode-deploy@v1.0
53+
- name: Deploy
54+
uses: vfrascello/xcode-deploy@v1.11
5455
with:
5556
configuration: 'Release'
5657
scheme: 'MyScheme'
@@ -71,8 +72,11 @@ See [action.yml][0] for more details.
7172
This composite action was written by me, Vincent Frascello, but uses actions by other open-source contributors:
7273
7374
[Oliver Jones][1]
75+
7476
[Florian Fried][2]
77+
7578
[Akio Jinsenji][3]
79+
7680
[Github Actions Team][4]
7781
7882
## License
@@ -83,4 +87,4 @@ Any contributions made under this project will be governed by the [MIT License][
8387
[2]: https://github.com/ffried
8488
[3]: https://github.com/akiojin
8589
[4]: https://github.com/actions
86-
[5]: https://github.com/vfrascello/xcode-deploy/blob/main/LICENSE
90+
[5]: https://github.com/vfrascello/xcode-deploy/blob/main/LICENSE

action.yml

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -48,13 +48,13 @@ runs:
4848
- name: Sanitize input
4949
shell: bash
5050
env:
51-
SCHEME: ${{ github.event.inputs.scheme }}
52-
CONFIGURATION: ${{ github.event.inputs.configuration }}
53-
PATH_TO_EXPORT_OPTIONS: ${{ github.event.inputs.path-to-export-options }}
51+
SCHEME: ${{ inputs.scheme }}
52+
CONFIGURATION: ${{ inputs.configuration }}
53+
PATH_TO_EXPORT_OPTIONS: ${{ inputs.path-to-export-options }}
5454
run: |
55-
if [[ "$SCHEME" == ${SCHEME//[^a-zA-Z0-9_.- ]/} ]] && \
56-
[[ "$CONFIGURATION" == ${CONFIGURATION//[^a-zA-Z0-9_.- ]/} ]] && \
57-
[[ "$PATH_TO_EXPORT_OPTIONS" == ${PATH_TO_EXPORT_OPTIONS//[^a-zA-Z0-9_.- ]/} ]]; then
55+
if [[ "$SCHEME" == ${SCHEME//[^a-zA-Z0-9_\.- ]/} ]] && \
56+
[[ "$CONFIGURATION" == ${CONFIGURATION//[^a-zA-Z0-9_\.- ]/} ]] && \
57+
[[ "$PATH_TO_EXPORT_OPTIONS" == ${PATH_TO_EXPORT_OPTIONS//^[a-zA-Z0-9](?:[a-zA-Z0-9 ._-]*[a-zA-Z0-9])?\.[a-zA-Z0-9_-]+$/} ]]; then
5858
echo "Inputs OK"
5959
exit 0
6060
else
@@ -78,26 +78,26 @@ runs:
7878
- name: Grab Default Scheme
7979
shell: bash
8080
run: |
81-
if [ ${{ github.event.inputs.scheme }} == '' ]; then
81+
if [ "${{ inputs.scheme }}" == "" ]; then
8282
scheme_list=$(xcodebuild -list -json | tr -d "\n")
8383
scheme=$(echo $scheme_list | ruby -e "require 'json'; puts JSON.parse(STDIN.gets)['project']['targets'][0]")
8484
echo $scheme | cat >scheme
8585
echo Using default scheme: $scheme
8686
else
87-
scheme=${{ github.event.inputs.scheme }}
87+
scheme=${{ inputs.scheme }}
8888
fi
8989
echo "SCHEME=$scheme" >> $GITHUB_ENV
9090
- name: Import Certificates
9191
uses: apple-actions/import-codesign-certs@v1
9292
id: codesign
9393
with:
94-
p12-file-base64: ${{ github.events.inputs.distribution-certificate-p12 }}
95-
p12-password: ${{ github.events.inputs.distribution-certificate-password }}
94+
p12-file-base64: ${{ inputs.distribution-certificate-p12 }}
95+
p12-password: ${{ inputs.distribution-certificate-password }}
9696
keychain: codesign
9797
- name: Install App Store Profile
9898
uses: akiojin/install-provisioning-profile-github-action@v1.0
9999
with:
100-
base64: ${{ github.events.inputs.app-store-provisioning-profile }}
100+
base64: ${{ inputs.app-store-provisioning-profile }}
101101
- name: Select Xcode
102102
shell: bash
103103
run: |
@@ -106,7 +106,7 @@ runs:
106106
- name: Increment Build Number
107107
shell: bash
108108
run: |
109-
if ${{ github.event.inputs.update-build }}; then
109+
if ${{ inputs.update-build }}; then
110110
count=`git rev-list --count HEAD`
111111
xcrun agvtool new-version -all $count
112112
fi
@@ -121,28 +121,28 @@ runs:
121121
-archivePath ${{ env.PROJECT_NAME }}.xcarchive
122122
derived-data-path: build/derivedData
123123
destination: generic/platform=iOS
124-
configuration: ${{ github.event.inputs.configuration }}
124+
configuration: ${{ inputs.configuration }}
125125
- name: Get App Store Connect API Key
126126
uses: timheuer/base64-to-file@v1.1
127127
with:
128-
fileName: AuthKey_${{ github.events.inputs.auth-key-id }}.p8
128+
fileName: AuthKey_${{ inputs.auth-key-id }}.p8
129129
fileDir: ${{ github.workspace }}/private_keys
130-
encodedString: ${{ github.events.inputs.auth-key-p8 }}
130+
encodedString: ${{ inputs.auth-key-p8 }}
131131
- name: Export Xcode archive
132132
shell: bash
133133
run: |
134134
xcodebuild -exportArchive -verbose \
135135
-sdk iphoneos \
136136
-archivePath ${{ github.workspace }}/${{ env.PROJECT_NAME }}.xcarchive \
137-
-exportOptionsPlist ${{ github.workspace }}/${{ github.event.inputs.path-to-export-options }} \
138-
-exportPath ${{ github.workspace }} \ -authenticationKeyIssuerID ${{ github.events.inputs.auth-key-issuer-id }} \
139-
-authenticationKeyID ${{ github.events.inputs.auth-key-id }} \
140-
-authenticationKeyPath ${{ github.workspace }}/private_keys/AuthKey_${{ github.events.inputs.auth-key-id }}.p8 \
137+
-exportOptionsPlist ${{ github.workspace }}/${{ inputs.path-to-export-options }} \
138+
-exportPath ${{ github.workspace }} \ -authenticationKeyIssuerID ${{ inputs.auth-key-issuer-id }} \
139+
-authenticationKeyID ${{ inputs.auth-key-id }} \
140+
-authenticationKeyPath ${{ github.workspace }}/private_keys/AuthKey_${{ inputs.auth-key-id }}.p8 \
141141
- name: Upload to App Store Connect
142142
shell: bash
143143
run: |
144144
xcrun altool --upload-app -f ${{ github.workspace }}/${{ env.PROJECT_NAME }}.ipa -t iOS \
145-
--apiIssuer ${{ secrets.AUTH_KEY_ISSUER_ID }} --apiKey ${{ github.events.inputs.auth-key-id }}
145+
--apiIssuer ${{ inputs.auth-key-issuer-id }} --apiKey ${{ inputs.auth-key-id }}
146146
- name: Cleanup
147147
shell: bash
148148
run: |

0 commit comments

Comments
 (0)