Skip to content

Need to add a cleanup step to delete keychain, so subsequent builds work #5

@naresh-fluidra

Description

@naresh-fluidra

When trying to build multi flavour app - subsequent builds fail because of existing keychain

- uses: cedvdb/action-flutter-build-ios@v1 with: build-cmd: flutter build ipa --release --flavor debug -t lib/main_debug.dart --export-options-plist=ios/debug.plist certificate-base64: ${{ secrets.PS_BUILD_CERTIFICATE_BASE64 }} certificate-password: ${{ secrets.PS_P12_PASSWORD }} provisioning-profile-base64: ${{ secrets.PS_BUILD_PROVISION_PROFILE_BASE64 }} keychain-password: ${{ secrets.PS_KEYCHAIN_PASSWORD }}

- uses: cedvdb/action-flutter-build-ios@v1 with: build-cmd: flutter build ipa --release --flavor release -t lib/main_release.dart --export-options-plist=ios/release.plist certificate-base64: ${{ secrets.PS_BUILD_CERTIFICATE_BASE64 }} certificate-password: ${{ secrets.PS_P12_PASSWORD }} provisioning-profile-base64: ${{ secrets.PS_BUILD_PROVISION_PROFILE_BASE64 }} keychain-password: ${{ secrets.SD_KEYCHAIN_PASSWORD }}

Even when a different keychain password is used, it will not override. So need to delete the existing keychain

- name: Delete keychain if: always() # Always run this step to ensure the keychain is properly disposed of run: | security delete-keychain "${{ KEYCHAIN_PATH }}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions