Skip to content

Commit d3e528c

Browse files
authored
[Fix] Publish to package should not simply based on the main branch (#808)
1 parent 707d86d commit d3e528c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

.github/workflows/python-publish.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ name: Upload Python Packages
33
on:
44
push:
55
tags: ['v*']
6-
branches: ['main'] # tag must be reachable from main branch
76

87
jobs:
98
deploy:
@@ -13,6 +12,11 @@ jobs:
1312
steps:
1413
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1514

15+
- name: Ensure tag commit is on main
16+
run: |
17+
git fetch origin main
18+
git merge-base --is-ancestor $GITHUB_SHA origin/main
19+
1620
- name: Set up Python
1721
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # 6.2.0
1822
with:

0 commit comments

Comments
 (0)