Skip to content

Commit 7a38776

Browse files
authored
fixes (#76)
1 parent 388e7af commit 7a38776

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,13 @@ name: Build Release
22

33
on:
44
workflow_dispatch:
5-
create:
65
push:
76
branches:
87
- 'release/*'
98

109
jobs:
1110
build:
1211
runs-on: macos-latest
13-
if: ${{ (github.event.ref_type == 'branch') && startsWith(github.ref, 'refs/heads/release/') }}
1412
steps:
1513
- name: Checkout
1614
uses: actions/checkout@v4

.github/workflows/create_release_branch.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ name: Create Release Branch
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
version_override:
7+
description: 'Version override'
8+
required: false
9+
type: string
510
schedule:
611
# Every day at 05:00 EST (10:00 UTC)
712
- cron: '0 10 * * *'
@@ -25,10 +30,16 @@ jobs:
2530
id: latest_firebase_release
2631
run: |
2732
latest_firebase_release=$(gh release view --repo $REPO --json tagName --jq '.tagName')
28-
echo "::set-output name=latest_firebase_release::${latest_firebase_release}"
33+
34+
if [ -z "$VERSION_OVERRIDE" ]; then
35+
echo "::set-output name=latest_firebase_release::${VERSION_OVERRIDE}"
36+
else
37+
echo "::set-output name=latest_firebase_release::${latest_firebase_release}"
38+
fi
2939
env:
3040
REPO: firebase/firebase-ios-sdk
3141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
VERSION_OVERRIDE: ${{ inputs.version_override }}
3243

3344
- name: Check if branch exists
3445
id: check_branch

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,20 @@ jobs:
4949
echo "Getting build workflow run for branch: $branch_name"
5050
5151
# Get the latest workflow run ID for the branch
52-
run_id=$(gh run list --branch $branch_name --workflow "Build Release" --limit 1 --json databaseId | jq -r '.[0].databaseId')
52+
run_id=$(gh run list --branch $branch_name --workflow "Build Release" --status success --limit 1 --json databaseId | jq -r '.[0].databaseId')
5353
5454
if [ "$run_id" = "null" ]; then
5555
echo "No build workflow run found for branch $branch_name"
5656
else
5757
echo "Found build workflow run ID: $run_id"
5858

59+
artifact_count=$(gh api repos/${{ github.repository }}/actions/runs/$run_id/artifacts | jq -r '.total_count')
60+
61+
if [ "$artifact_count" -eq 0 ]; then
62+
echo "No artifacts found for workflow run $run_id"
63+
exit 0
64+
fi
65+
5966
# Download all artifacts from the workflow run
6067
gh run download $run_id --repo ${{ github.repository }} --dir ./artifacts/
6168

0 commit comments

Comments
 (0)