|
4 | 4 | pull_request:
|
5 | 5 | paths:
|
6 | 6 | - '.github/workflows/release.yml'
|
| 7 | + - 'scripts/create_spec_repo/*' |
7 | 8 | schedule:
|
8 | 9 | # Run every day at 11pm (PST) - cron uses UTC times
|
9 | 10 | - cron: '0 7 * * *'
|
10 | 11 |
|
11 | 12 | jobs:
|
| 13 | + buildup_SpecsTesting_repo: |
| 14 | + # Don't run on private repo unless it is a PR. |
| 15 | + if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request' |
| 16 | + env: |
| 17 | + bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 18 | + local_repo: specstesting |
| 19 | + local_sdk_repo_dir: /tmp/test/firebase-ios-sdk |
| 20 | + podspec_repo_branch: master |
| 21 | + runs-on: macOS-latest |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v2 |
| 24 | + - name: Get token |
| 25 | + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \ |
| 26 | + bot-access.txt "$bot_token_secret" |
| 27 | + - name: Update SpecStaging repo setup |
| 28 | + run: scripts/release_testing_setup.sh |
| 29 | + - name: Update SpecStaging repo |
| 30 | + run: | |
| 31 | + botaccess=`cat bot-access.txt` |
| 32 | + cd scripts/create_spec_repo/ |
| 33 | + swift build |
| 34 | + pod repo add --silent "${local_repo}" https://"$botaccess"@github.com/FirebasePrivate/SpecsTesting.git |
| 35 | + BOT_TOKEN="${botaccess}" .build/debug/SpecRepoBuilder --sdk_repo "${local_sdk_repo_dir}" --local_spec_repo_name "${local_repo}" |
| 36 | + - name: Clean Artifacts |
| 37 | + if: ${{ always() }} |
| 38 | + run: | |
| 39 | + pod repo remove "${local_repo}" |
| 40 | + rm -rf bot-access.txt |
| 41 | + - uses: actions/upload-artifact@v2 |
| 42 | + with: |
| 43 | + name: firebase-ios-sdk |
| 44 | + path: /tmp/test/firebase-ios-sdk |
12 | 45 |
|
13 | 46 | quickstart_release_test:
|
14 | 47 | # Don't run on private repo unless it is a PR.
|
15 | 48 | if: github.repository != 'FirebasePrivate/firebase-ios-sdk' || github.event_name == 'pull_request'
|
| 49 | + needs: buildup_SpecsTesting_repo |
16 | 50 | env:
|
17 | 51 | plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
|
18 | 52 | signin_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
|
| 53 | + bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }} |
| 54 | + testing_repo_dir: "/tmp/test/" |
| 55 | + testing_repo: "firebase-ios-sdk" |
19 | 56 | runs-on: macOS-latest
|
20 | 57 | steps:
|
21 | 58 | - uses: actions/checkout@v2
|
22 |
| - - name: Setup quickstart |
23 |
| - run: scripts/setup_quickstart.sh config release_testing |
| 59 | + - name: Get token |
| 60 | + run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/bot-access.txt.gpg \ |
| 61 | + bot-access.txt "$bot_token_secret" |
| 62 | + - name: Get testing podspec repo |
| 63 | + uses: actions/download-artifact@v1 |
| 64 | + with: |
| 65 | + name: firebase-ios-sdk |
| 66 | + - name: Setup testing repo and quickstart |
| 67 | + run: | |
| 68 | + mkdir -p "${testing_repo_dir}" |
| 69 | + mv "${GITHUB_WORKSPACE}/${testing_repo}" "${testing_repo_dir}" |
| 70 | + botaccess=`cat bot-access.txt` |
| 71 | + BOT_TOKEN="${botaccess}" scripts/setup_quickstart.sh config release_testing |
24 | 72 | - name: Install Secret GoogleService-Info.plist
|
25 | 73 | run: scripts/decrypt_gha_secret.sh scripts/gha-encrypted/qs-config.plist.gpg \
|
26 | 74 | quickstart-ios/config/GoogleService-Info.plist "$plist_secret"
|
|
30 | 78 | - name: Test Swift Quickstart
|
31 | 79 | run: ([ -z $plist_secret ] || scripts/third_party/travis/retry.sh scripts/test_quickstart.sh Config)
|
32 | 80 | - name: Remove data before upload
|
33 |
| - run: scripts/remove_data.sh config |
| 81 | + run: scripts/remove_data.sh config release_testing |
34 | 82 | - uses: actions/upload-artifact@v2
|
35 | 83 | if: ${{ failure() }}
|
36 | 84 | with:
|
|
0 commit comments