File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,17 @@ jobs:
2020 env :
2121 RELEASE_REF : ${{ github.event_name == 'workflow_dispatch' && format('refs/tags/{0}', github.event.inputs.tag) || github.ref }}
2222 RELEASE_TAG : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.tag || github.ref_name }}
23- DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
2423 steps :
2524 - uses : actions/checkout@v4
2625 with :
2726 fetch-depth : 0
2827 ref : ${{ env.RELEASE_REF }}
2928
30- - name : Ensure tag points to default branch
29+ - name : Ensure tag is published from main
3130 run : |
32- TARGET_BRANCH=${DEFAULT_BRANCH:-master}
33- git fetch origin "${TARGET_BRANCH}"
34- if ! git merge-base --is-ancestor "$(git rev-parse HEAD)" "origin/${TARGET_BRANCH}"; then
35- echo "::error::Release tag must point to a commit reachable from ${TARGET_BRANCH}"
31+ git fetch origin main
32+ if ! git merge-base --is-ancestor "$(git rev-parse HEAD)" origin/main; then
33+ echo "::error::Release tag must point to a commit reachable from main"
3634 exit 1
3735 fi
3836
You can’t perform that action at this time.
0 commit comments