Skip to content

Commit 1f2f5f6

Browse files
authored
Update release/prerelease workflows. (#7703)
The release workflow will run from the latest release branch of the SDK repo. The prerelease workflow will run from the head of the master branch. Pods tested in release workflow will source from SpecsTesting repo SpecsStaging repo cdn Pods tested in prerelease workflow will source from SpecsReleasing repo SpecsDev SpecsStaging repo cdn
1 parent 7964564 commit 1f2f5f6

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

.github/workflows/prerelease.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ jobs:
1717
env:
1818
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
1919
local_repo: specstesting
20+
# The SDK repo will be cloned to this dir and podspecs from
21+
# 'podspec_repo_branch' of this repo will be validated and pushed to the
22+
# testing repo.
2023
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
24+
podspec_repo_branch: master
2125
runs-on: macOS-latest
2226
steps:
2327
- uses: actions/checkout@v2
@@ -30,7 +34,7 @@ jobs:
3034
- name: Update SpecsReleasing repo setup
3135
run: |
3236
ossbotaccess=`cat oss-bot-access.txt`
33-
BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" scripts/release_testing_setup.sh RC_testing
37+
BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" sdk_version_config="${GITHUB_WORKSPACE}/scripts/create_spec_repo/RC_firebase_sdk.textproto" local_sdk_repo_dir="${local_sdk_repo_dir}" podspec_repo_branch="${podspec_repo_branch}" scripts/release_testing_setup.sh RC_testing
3438
- name: Update SpecsReleasing repo
3539
run: |
3640
botaccess=`cat bot-access.txt`

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
env:
1919
bot_token_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
2020
local_repo: specstesting
21-
nightly_version: "7.5.0"
21+
# The SDK repo will be cloned to this dir and podspecs from
22+
# the latest release branch of this repo will be validated and pushed to
23+
# the testing repo.
2224
local_sdk_repo_dir: /tmp/test/firebase-ios-sdk
23-
podspec_repo_branch: master
2425
runs-on: macOS-latest
2526
steps:
2627
- uses: actions/checkout@v2
@@ -33,7 +34,7 @@ jobs:
3334
- name: Update SpecsTesting repo setup
3435
run: |
3536
ossbotaccess=`cat oss-bot-access.txt`
36-
BOT_TOKEN="${ossbotaccess}" test_version="${nightly_version}" scripts/release_testing_setup.sh nightly_testing
37+
BOT_TOKEN="${ossbotaccess}" scripts/release_testing_setup.sh nightly_testing
3738
- name: Update SpecsTesting repo
3839
run: |
3940
botaccess=`cat bot-access.txt`

scripts/create_spec_repo/Sources/SpecRepoBuilder/main.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ extension Constants {
2424
static let dependencyLineSeparators = CharacterSet(charactersIn: " ,/")
2525
static let podSources = [
2626
"https://${BOT_TOKEN}@github.com/FirebasePrivate/SpecsTesting",
27-
"https://github.com/firebase/SpecsDev.git",
2827
"https://github.com/firebase/SpecsStaging.git",
2928
"https://cdn.cocoapods.org/",
3029
]

scripts/release_testing_setup.sh

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15+
# This script will `git clone` the SDK repo to local and look for the latest
16+
# release branch
1517
set -xe
1618

1719
TESTINGMODE=${1-}
@@ -23,11 +25,13 @@ fi
2325
mkdir -p "${local_sdk_repo_dir}"
2426
echo "git clone ${podspec_repo_branch} from github.com/firebase/firebase-ios-sdk.git to ${local_sdk_repo_dir}"
2527
set +x
28+
# Using token here to update tags later.
2629
git clone -q https://"${BOT_TOKEN}"@github.com/firebase/firebase-ios-sdk.git "${local_sdk_repo_dir}"
2730
set -x
2831

2932
cd "${local_sdk_repo_dir}"
30-
# This is to search Cocoapods-X.Y.Z tags from all branches of the sdk repo and test_version is X.Y.Z
33+
# The chunk below is to determine the latest version by searching
34+
# Cocoapods-X.Y.Z tags from all branches of the sdk repo and test_version is X.Y.Z
3135
test_version=$(git tag -l --sort=-version:refname CocoaPods-*[0-9] | head -n 1 | sed -n 's/CocoaPods-//p')
3236
# Check if release-X.Y.Z branch exists in the remote repo.
3337
release_branch=$(git branch -r -l "origin/release-${test_version}")
@@ -43,8 +47,10 @@ if [ -z $release_branch ];then
4347
fi
4448
fi
4549

46-
# Get release branch, release-X.Y.Z.
47-
podspec_repo_branch=$(echo $release_branch | sed -n 's/\s*origin\///p')
50+
if [ -z $podspec_repo_branch ];then
51+
# Get release branch, release-X.Y.Z.
52+
podspec_repo_branch=$(echo $release_branch | sed -n 's/\s*origin\///p')
53+
fi
4854

4955
git config --global user.email "[email protected]"
5056
git config --global user.name "google-oss-bot"

0 commit comments

Comments
 (0)