@@ -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