Initial commit
This commit is contained in:
commit
c1e7415871
56 changed files with 3225 additions and 0 deletions
43
.github/actions/archive/action.yml
vendored
Normal file
43
.github/actions/archive/action.yml
vendored
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
name: Archive
|
||||
inputs:
|
||||
scheme:
|
||||
description: Scheme
|
||||
required: true
|
||||
destination:
|
||||
description: Destination
|
||||
required: true
|
||||
app-store-key:
|
||||
description: App Store key in PEM PKCS#8 format
|
||||
required: true
|
||||
app-store-key-id:
|
||||
description: App Store key ID
|
||||
required: true
|
||||
app-store-key-issuer-id:
|
||||
description: App Store key issuer ID
|
||||
required: true
|
||||
archive-path:
|
||||
description: Xcode archive path
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- shell: bash
|
||||
working-directory: Apple
|
||||
run: |
|
||||
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||
|
||||
xcodebuild archive \
|
||||
-allowProvisioningUpdates \
|
||||
-allowProvisioningDeviceRegistration \
|
||||
-authenticationKeyID ${{ inputs.app-store-key-id }} \
|
||||
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
|
||||
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
|
||||
-onlyUsePackageVersionsFromResolvedFile \
|
||||
-scheme '${{ inputs.scheme }}' \
|
||||
-destination '${{ inputs.destination }}' \
|
||||
-archivePath '${{ inputs.archive-path }}' \
|
||||
-resultBundlePath BuildResults.xcresult
|
||||
|
||||
./Tools/xcresulttool-github BuildResults.xcresult
|
||||
|
||||
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||
37
.github/actions/build-for-testing/action.yml
vendored
Normal file
37
.github/actions/build-for-testing/action.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Build For Testing
|
||||
inputs:
|
||||
scheme:
|
||||
description: Scheme
|
||||
required: true
|
||||
destination:
|
||||
description: Destination
|
||||
required: true
|
||||
app-store-key:
|
||||
description: App Store key in PEM PKCS#8 format
|
||||
required: true
|
||||
app-store-key-id:
|
||||
description: App Store key ID
|
||||
required: true
|
||||
app-store-key-issuer-id:
|
||||
description: App Store key issuer ID
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- shell: bash
|
||||
working-directory: Apple
|
||||
run: |
|
||||
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||
|
||||
xcodebuild clean build-for-testing \
|
||||
-allowProvisioningUpdates \
|
||||
-allowProvisioningDeviceRegistration \
|
||||
-authenticationKeyID ${{ inputs.app-store-key-id }} \
|
||||
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
|
||||
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
|
||||
-onlyUsePackageVersionsFromResolvedFile \
|
||||
-scheme '${{ inputs.scheme }}' \
|
||||
-destination '${{ inputs.destination }}' \
|
||||
-resultBundlePath BuildResults.xcresult
|
||||
|
||||
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||
47
.github/actions/export/action.yml
vendored
Normal file
47
.github/actions/export/action.yml
vendored
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
name: Notarize
|
||||
inputs:
|
||||
app-store-key:
|
||||
description: App Store key in PEM PKCS#8 format
|
||||
required: true
|
||||
app-store-key-id:
|
||||
description: App Store key ID
|
||||
required: true
|
||||
app-store-key-issuer-id:
|
||||
description: App Store key issuer ID
|
||||
required: true
|
||||
archive-path:
|
||||
description: Xcode archive path
|
||||
required: true
|
||||
destination:
|
||||
description: The Xcode export destination. This can either be "export" or "upload"
|
||||
required: true
|
||||
method:
|
||||
description: The Xcode export method. This can be one of app-store, validation, ad-hoc, package, enterprise, development, developer-id, or mac-application.
|
||||
required: true
|
||||
export-path:
|
||||
description: The path to export the archive to
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- id: notarize
|
||||
shell: bash
|
||||
working-directory: Apple
|
||||
run: |
|
||||
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||
|
||||
echo '{"destination":"${{ inputs.destination }}","method":"${{ inputs.method }}"}' \
|
||||
| plutil -convert xml1 -o ExportOptions.plist -
|
||||
|
||||
xcodebuild \
|
||||
-exportArchive \
|
||||
-allowProvisioningUpdates \
|
||||
-allowProvisioningDeviceRegistration \
|
||||
-authenticationKeyID ${{ inputs.app-store-key-id }} \
|
||||
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
|
||||
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
|
||||
-archivePath '${{ inputs.archive-path }}' \
|
||||
-exportPath '${{ inputs.export-path }}' \
|
||||
-exportOptionsPlist ExportOptions.plist
|
||||
|
||||
rm -rf AuthKey_${{ inputs.app-store-key-id }}.p8 ExportOptions.plist
|
||||
26
.github/actions/import-cert/action.yml
vendored
Normal file
26
.github/actions/import-cert/action.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Import Certificate
|
||||
inputs:
|
||||
certificate:
|
||||
description: 'The certificate in p12 format, encoded as base64'
|
||||
required: true
|
||||
password:
|
||||
description: 'The certificate password'
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- shell: bash
|
||||
run: |
|
||||
echo -n "${{ inputs.certificate }}" | base64 -d > Developer.p12
|
||||
security create-keychain -p password Developer.keychain
|
||||
security set-keychain-settings -lut 21600 Developer.keychain
|
||||
security unlock-keychain -p password Developer.keychain
|
||||
security import Developer.p12 \
|
||||
-k Developer.keychain \
|
||||
-f pkcs12 \
|
||||
-A \
|
||||
-T /usr/bin/codesign \
|
||||
-T /usr/bin/security \
|
||||
-P ${{ inputs.password }}
|
||||
security set-key-partition-list -S apple-tool:,apple: -k password Developer.keychain
|
||||
security list-keychains -d user -s login.keychain Developer.keychain
|
||||
37
.github/actions/test-without-building/action.yml
vendored
Normal file
37
.github/actions/test-without-building/action.yml
vendored
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
name: Test Without Building
|
||||
inputs:
|
||||
scheme:
|
||||
description: Scheme
|
||||
required: true
|
||||
destination:
|
||||
description: Destination
|
||||
required: true
|
||||
test-plan:
|
||||
description: Test Plan
|
||||
required: false
|
||||
artifact-prefix:
|
||||
description: The prefix for the filename of the uploaded xcresults file
|
||||
required: true
|
||||
check-name:
|
||||
description: The check name
|
||||
required: true
|
||||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- shell: bash
|
||||
id: vars
|
||||
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
|
||||
- shell: bash
|
||||
working-directory: Apple
|
||||
run: |
|
||||
xcodebuild test-without-building \
|
||||
-scheme '${{ inputs.scheme }}' \
|
||||
-destination '${{ inputs.destination }}' \
|
||||
${{ inputs.test-plan && '-testPlan ' }}${{ inputs.test-plan }} \
|
||||
-resultBundlePath "${{ inputs.artifact-prefix }}-${{ steps.vars.outputs.sha_short }}.xcresult"
|
||||
- uses: kishikawakatsumi/xcresulttool@v1
|
||||
if: always()
|
||||
with:
|
||||
path: Apple/${{ inputs.artifact-prefix }}-${{ steps.vars.outputs.sha_short }}.xcresult
|
||||
title: ${{ inputs.check-name }}
|
||||
show-passed-tests: false
|
||||
Loading…
Add table
Add a link
Reference in a new issue