Cache Swift packages in Github Actions
This is helpful now that SwiftLint is a package dependency.
This commit is contained in:
parent
3c30a4b336
commit
bea8af0d66
1 changed files with 23 additions and 1 deletions
24
.github/actions/build-for-testing/action.yml
vendored
24
.github/actions/build-for-testing/action.yml
vendored
|
|
@ -18,7 +18,27 @@ inputs:
|
||||||
runs:
|
runs:
|
||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- name: Resolve Swift Packages
|
||||||
|
shell: bash
|
||||||
|
working-directory: Apple
|
||||||
|
run: |
|
||||||
|
xcodebuild -resolvePackageDependencies \
|
||||||
|
-scheme '${{ inputs.scheme }}' \
|
||||||
|
-destination '${{ inputs.destination }}' \
|
||||||
|
-onlyUsePackageVersionsFromResolvedFile \
|
||||||
|
-clonedSourcePackagesDirPath SourcePackages \
|
||||||
|
-packageCachePath $PWD/PackageCache
|
||||||
|
- name: Cache Swift Packages
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
Apple/PackageCache
|
||||||
|
Apple/SourcePackages
|
||||||
|
key: ${{ runner.os }}-${{ inputs.scheme }}-${{ hashFiles('**/Package.resolved') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ inputs.scheme }}-
|
||||||
|
- name: Build
|
||||||
|
shell: bash
|
||||||
working-directory: Apple
|
working-directory: Apple
|
||||||
run: |
|
run: |
|
||||||
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
|
echo "${{ inputs.app-store-key }}" > AuthKey_${{ inputs.app-store-key-id }}.p8
|
||||||
|
|
@ -30,6 +50,8 @@ runs:
|
||||||
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
|
-authenticationKeyIssuerID ${{ inputs.app-store-key-issuer-id }} \
|
||||||
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
|
-authenticationKeyPath "${PWD}/AuthKey_${{ inputs.app-store-key-id }}.p8" \
|
||||||
-onlyUsePackageVersionsFromResolvedFile \
|
-onlyUsePackageVersionsFromResolvedFile \
|
||||||
|
-clonedSourcePackagesDirPath SourcePackages \
|
||||||
|
-packageCachePath $PWD/PackageCache \
|
||||||
-skipPackagePluginValidation \
|
-skipPackagePluginValidation \
|
||||||
-scheme '${{ inputs.scheme }}' \
|
-scheme '${{ inputs.scheme }}' \
|
||||||
-destination '${{ inputs.destination }}' \
|
-destination '${{ inputs.destination }}' \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue