π Publish Demo App (TestFlight) #252
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: π Publish Demo App (TestFlight) | |
| on: | |
| workflow_dispatch: {} | |
| workflow_call: | |
| secrets: # When triggered via another workflow, secrets are not automatically forwarded | |
| BUILD_CERTIFICATE_BASE64: | |
| required: true | |
| DEVELOPMENT_CERTIFICATE_BASE64: | |
| required: true | |
| P12_PASSWORD: | |
| required: true | |
| BUILD_PROVISION_PROFILE_BASE64: | |
| required: true | |
| KEYCHAIN_PASSWORD: | |
| required: true | |
| DEMO_APP_TEST_ENV_CLIENT_KEY: | |
| required: true | |
| DEMO_SERVER_TEST_ENV_API_KEY: | |
| required: true | |
| MERCHANT_ACCOUNT: | |
| required: true | |
| APPLE_DEVELOPMENT_TEAM_ID: | |
| required: true | |
| ENVIRONMENT: | |
| required: true | |
| APPLE_ID_USERNAME: | |
| required: true | |
| APPLE_APP_SPECIFIC_PASSWORD: | |
| required: true | |
| XCODE_AUTHENTICATION_KEY_ID: | |
| required: true | |
| XCODE_AUTHENTICATION_KEY_ISSUER_ID: | |
| required: true | |
| XCODE_AUTHENTICATION_KEY_BASE64: | |
| required: true | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| publish: | |
| runs-on: macos-15-xlarge | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Select latest Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: '16.4' | |
| - name: βοΈ Configure Demo App | |
| env: | |
| ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
| run: | | |
| sed -i '' "s/static let demoServerEnvironment.*=.*/static let demoServerEnvironment = DemoCheckoutAPIEnvironment.$ENVIRONMENT/g" ./Demo/Configuration.swift | |
| sed -i '' "s/static let classicAPIEnvironment.*=.*/static let classicAPIEnvironment = DemoClassicAPIEnvironment.$ENVIRONMENT/g" ./Demo/Configuration.swift | |
| sed -i '' "s/static let componentsEnvironment.*=.*/static let componentsEnvironment = Environment.$ENVIRONMENT/g" ./Demo/Configuration.swift | |
| - name: π Publish Demo App | |
| env: | |
| # Apple credentials | |
| APPLE_ID_USERNAME: ${{ secrets.APPLE_ID_USERNAME }} | |
| APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | |
| # Xcode signing key | |
| XCODE_AUTHENTICATION_KEY_ID: ${{ secrets.XCODE_AUTHENTICATION_KEY_ID }} | |
| XCODE_AUTHENTICATION_KEY_ISSUER_ID: ${{ secrets.XCODE_AUTHENTICATION_KEY_ISSUER_ID }} | |
| XCODE_AUTHENTICATION_KEY_BASE64: ${{ secrets.XCODE_AUTHENTICATION_KEY_BASE64 }} | |
| # Build certificates & profiles | |
| BUILD_CERTIFICATE_BASE64: ${{ secrets.BUILD_CERTIFICATE_BASE64 }} | |
| DEVELOPMENT_CERTIFICATE_BASE64: ${{ secrets.DEVELOPMENT_CERTIFICATE_BASE64 }} | |
| P12_PASSWORD: ${{ secrets.P12_PASSWORD }} | |
| BUILD_PROVISION_PROFILE_BASE64: ${{ secrets.BUILD_PROVISION_PROFILE_BASE64 }} | |
| KEYCHAIN_PASSWORD: ${{ secrets.KEYCHAIN_PASSWORD }} | |
| # App configuration | |
| MERCHANT_CLIENT_KEY: ${{ secrets.DEMO_APP_TEST_ENV_CLIENT_KEY }} | |
| MERCHANT_SERVER_HOST: ${{ secrets.MERCHANT_SERVER_HOST }} | |
| MERCHANT_ACCOUNT: ${{ secrets.MERCHANT_ACCOUNT }} | |
| ADYEN_SERVER_API_KEY: ${{ secrets.DEMO_SERVER_TEST_ENV_API_KEY }} | |
| APPLE_TEAM_IDENTIFIER: ${{ secrets.APPLE_DEVELOPMENT_TEAM_ID }} | |
| ENVIRONMENT: ${{ secrets.ENVIRONMENT }} | |
| run: | | |
| chmod +x ./Scripts/publish-demo-app.sh | |
| ./Scripts/publish-demo-app.sh | |