Rap*_*aël 6 caching ios fastlane flutter github-actions
我正在尝试使用缓存优化 android 和 ios 的 CICD 部署工作流程,但缓存路径有问题。当不缓存工作流程时效果很好,但在缓存时,fastlane 操作找不到 flutter 或 pod,并且我收到类似“error: /Users/runner/work/xxx/xxx/ios/Flutter/Release.xcconfig:1: ”的错误:在搜索路径中找不到包含的文件“Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig”(在项目“Runner”的目标“Runner”中)”
name: Deploy staging
on:
workflow_dispatch:
inputs:
lane:
description: "Staging lane to use : alpha or beta"
required: true
default: "alpha"
jobs:
deploy-to-ios:
runs-on: macos-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Flutter Cache
id: cache-flutter
uses: actions/cache@v2
with:
path: /Users/runner/hostedtoolcache/flutter
key: ${{ runner.os }}-flutter
restore-keys: |
${{ runner.os }}-flutter-
- name: Setup Flutter
uses: subosito/flutter-action@v1
if: steps.cache-flutter.outputs.cache-hit != 'true'
with:
channel: "stable"
- name: Setup Pods Cache
id: cache-pods
uses: actions/cache@v2
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('ios/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-
- name: Setup Pods
if: steps.cache-pods.outputs.cache-hit != 'true'
run: |
cd ios/
flutter pub get
pod install
# Setup Ruby, Bundler, and Gemfile dependencies
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7.4"
bundler-cache: true
working-directory: ios
- name: Setup Fastlane Cache
id: cache-fastlane
uses: actions/cache@v2
with:
path: ./vendor/bundle
key: ${{ runner.os }}-fastlane-${{ hashFiles('ios/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-fastlane-
- name: Setup Fastlane
if: steps.cache-fastlane.outputs.cache-hit != 'true'
run: gem install fastlane
- name: Build and deploy with Fastlane
run: bundle exec fastlane ${{ github.event.inputs.lane || 'beta' }}
env:
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
APP_STORE_CONNECT_API_KEY_KEY: ${{ secrets.APP_STORE_CONNECT_API_KEY_KEY }}
working-directory: ios
Run Code Online (Sandbox Code Playgroud)
知道如何找到 flutter 和 pod 的 fastlane 中使用的路径并将文件缓存在那里以便找到它们吗?
归档时间: |
|
查看次数: |
1533 次 |
最近记录: |