Skip to content

Commit 6807f0c

Browse files
committed
ci: trigger dev publish on feature branch push
Use ref_name fallback for push events where head_ref is empty, and add condition to match non-main branch pushes.
1 parent 9232ccb commit 6807f0c

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,9 +90,14 @@ jobs:
9090
run: pnpm run build
9191

9292
- name: Publish (development)
93-
if: github.repository == 'RightCapitalHQ/php-parser' && github.base_ref == github.event.repository.default_branch
93+
if: >-
94+
github.repository == 'RightCapitalHQ/php-parser' &&
95+
(
96+
github.base_ref == github.event.repository.default_branch ||
97+
(github.event_name == 'push' && github.ref_name != github.event.repository.default_branch)
98+
)
9499
env:
95-
HEAD_REF: ${{ github.head_ref }}
100+
HEAD_REF: ${{ github.head_ref || github.ref_name }}
96101
run: |
97102
preid="${HEAD_REF//\//-}".${{ github.run_number }}.${{ github.run_attempt }}
98103
npm --no-git-tag-version version prerelease --preid="${preid}"

0 commit comments

Comments
 (0)