Skip to content

Commit

Permalink
chore: update spm cache action
Browse files Browse the repository at this point in the history
  • Loading branch information
RyuNen344 committed Aug 21, 2023
1 parent 5d7c670 commit 12c60dc
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions .github/actions/spm/action.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
name: "cache SPM"
description: "select xcode defined at .xcode-version"
description: "save and restore SPM cache"
runs:
using: "composite"
steps:
- name: cache SPM
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
- uses: actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
id: cache-spm
with:
path: |
app-ios/build/DerivedData/SourcePackages
key: v1-konan-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
restore-keys: |
v1-konan-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}
v1-konan-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}
./app-ios/build/DerivedData/SourcePackages
key: v1-spm-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}

- uses: andstor/file-existence-action@20b4d2e596410855db8f9ca21e96fbe18e12930b # v2
id: spm-cache
with:
files: "app-ios/build/DerivedData/SourcePackages"

- if: steps.spm-cache.outputs.files_exists != 'true'
working-directory: app-ios
- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: app-ios
run: bundle exec fastlane shared

- if: steps.spm-cache.outputs.files_exists != 'true'
working-directory: app-ios
- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
shell: bash
working-directory: app-ios
run: bundle exec fastlane resolved_package

- if: ${{ steps.cache-spm.outputs.cache-hit != 'true' }}
uses: actions/cache/save@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
with:
path: |
./app-ios/build/DerivedData/SourcePackages
key: v1-spm-${{ runner.os }}-${{ hashFiles('.xcode-version') }}-${{ hashFiles('app-ios/Modules/Package.swift') }}-${{ hashFiles('app-ios/App/DroidKaigi2023/DroidKaigi2023.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}

0 comments on commit 12c60dc

Please sign in to comment.