Skip to content

Commit 9934332

Browse files
authored
ci: skip publishing if behind main (#2562)
1 parent 24a20d3 commit 9934332

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -670,9 +670,12 @@ jobs:
670670
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
671671
NPM_CONFIG_PROVENANCE: true
672672
run: |
673-
git config user.email 'github-actions[bot]'
674-
git config user.name 'github-actions[bot]@users.noreply.github.com'
675-
yarn nx release --yes
673+
git fetch origin trunk
674+
if git merge-base --is-ancestor origin/trunk HEAD; then
675+
git config user.email 'github-actions[bot]'
676+
git config user.name 'github-actions[bot]@users.noreply.github.com'
677+
yarn nx release --yes
678+
fi
676679
autobot:
677680
name: "Autobot"
678681
permissions:

0 commit comments

Comments
 (0)