Skip to content

Commit 40938f4

Browse files
committed
Enable pub.dev steps only for version tags in CI
Added conditional execution for pub.dev credential configuration and pubspec version patching steps to run only when the workflow is triggered by a version tag. This prevents these steps from running on non-release branches.
1 parent 8010121 commit 40938f4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,14 +270,15 @@ jobs:
270270
echo "PKG_VER=$PKG_VER" | tee -a "$GITHUB_ENV"
271271
272272
- name: Configure pub.dev credentials
273-
# if: ${{ secrets.PUB_DEV_TOKEN != '' }}
273+
if: startsWith(github.ref, 'refs/tags/v')
274274
env:
275275
PUB_DEV_TOKEN: ${{ secrets.PUB_DEV_TOKEN }}
276276
run: |
277277
mkdir -p $HOME/.config/dart
278278
echo "$PUB_DEV_TOKEN" | base64 --decode > $HOME/.config/dart/pub-credentials.json
279279
280280
- name: Patch pubspec versions
281+
if: startsWith(github.ref, 'refs/tags/v')
281282
shell: bash
282283
working-directory: "src"
283284
run: |

0 commit comments

Comments
 (0)