Skip to content

Commit de6a930

Browse files
committed
adding a dry run option
1 parent 54b8229 commit de6a930

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/rc-release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ on:
5959
required: false
6060
type: boolean
6161
default: false
62+
dry_run:
63+
description: 'Do not publish RC to pub.dev (still opens PR and creates prerelease)'
64+
required: false
65+
type: boolean
66+
default: true
6267

6368
# Prevent multiple RC workflows from running simultaneously
6469
concurrency:
@@ -87,6 +92,7 @@ jobs:
8792
ios_sdk_version: ${{ steps.compute.outputs.ios_sdk_version }}
8893
android_sdk_version: ${{ steps.compute.outputs.android_sdk_version }}
8994
deploy_to_qa: ${{ steps.compute.outputs.deploy_to_qa }}
95+
dry_run: ${{ steps.compute.outputs.dry_run }}
9096

9197
steps:
9298
- name: 📥 Checkout repository
@@ -101,6 +107,7 @@ jobs:
101107
AND_VER="${{ github.event.inputs.android_sdk_version }}"
102108
BASE_BRANCH_INPUT="${{ github.event.inputs.base_branch }}"
103109
DEPLOY_TO_QA="${{ github.event.inputs.deploy_to_qa }}"
110+
DRY_RUN_INPUT="${{ github.event.inputs.dry_run }}"
104111
105112
if [[ -z "$VERSION" || -z "$IOS_VER" || -z "$AND_VER" ]]; then
106113
echo "❌ Missing required inputs"; exit 1
@@ -136,6 +143,7 @@ jobs:
136143
echo "ios_sdk_version=$IOS_VER" >> $GITHUB_OUTPUT
137144
echo "android_sdk_version=$AND_VER" >> $GITHUB_OUTPUT
138145
echo "deploy_to_qa=$DEPLOY_TO_QA" >> $GITHUB_OUTPUT
146+
echo "dry_run=$DRY_RUN_INPUT" >> $GITHUB_OUTPUT
139147
140148
# ===========================================================================
141149
# Job 2: Run CI Pipeline
@@ -399,7 +407,12 @@ jobs:
399407
run: flutter pub get
400408
- name: 📝 Validate package (dry-run)
401409
run: flutter pub publish --dry-run
410+
- name: ℹ️ RC dry-run active — skipping publish
411+
if: ${{ needs.validate-release.outputs.dry_run == 'true' }}
412+
run: |
413+
echo "RC dry_run is true — will not publish to pub.dev."
402414
- name: 🚀 Publish RC to pub.dev
415+
if: ${{ needs.validate-release.outputs.dry_run != 'true' }}
403416
env:
404417
PUB_DEV_CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }}
405418
run: |
@@ -570,7 +583,7 @@ jobs:
570583
rc-summary:
571584
name: 📋 RC Summary
572585
runs-on: ubuntu-latest
573-
needs: [validate-release, run-ci, update-version, create-prerelease]
586+
needs: [validate-release, run-ci, prepare-branch, create-prerelease]
574587
if: always()
575588

576589
steps:
@@ -585,7 +598,7 @@ jobs:
585598
echo "-----------------------------------------"
586599
echo "Validation: ${{ needs.validate-release.result }}"
587600
echo "CI Pipeline: ${{ needs.run-ci.result }}"
588-
echo "Version Update: ${{ needs.update-version.result }}"
601+
echo "Prepare Branch: ${{ needs.prepare-branch.result }}"
589602
echo "Pre-Release: ${{ needs.create-prerelease.result }}"
590603
echo "========================================="
591604

0 commit comments

Comments
 (0)