File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -131,13 +131,14 @@ jobs:
131131 id : release
132132 env :
133133 INPUT_RELEASE_VERSION : ${{ github.event.inputs.release_version }}
134+ DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
134135 run : |
135136 set -eu
136137 IS_RELEASE=false
137138 if [ "${GITHUB_REF#refs/tags/}" != "$GITHUB_REF" ]; then
138139 IS_RELEASE=true
139140 VERSION="$GITHUB_REF_NAME"
140- elif [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ]; then
141+ elif [ "$GITHUB_EVENT_NAME" = "workflow_dispatch" ] || [ "$GITHUB_REF" = "refs/heads/$DEFAULT_BRANCH" ] ; then
141142 IS_RELEASE=true
142143 if [ -n "$INPUT_RELEASE_VERSION" ]; then
143144 VERSION="$INPUT_RELEASE_VERSION"
@@ -322,7 +323,7 @@ jobs:
322323 retention-days : 14
323324
324325 release :
325- if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch'
326+ if : startsWith(github.ref, 'refs/tags/') || github.event_name == 'workflow_dispatch' || github.ref == format('refs/heads/{0}', github.event.repository.default_branch)
326327 needs : build
327328 runs-on : ubuntu-22.04
328329 permissions :
@@ -334,6 +335,7 @@ jobs:
334335 id : release
335336 env :
336337 INPUT_RELEASE_VERSION : ${{ github.event.inputs.release_version }}
338+ DEFAULT_BRANCH : ${{ github.event.repository.default_branch }}
337339 run : |
338340 set -euo pipefail
339341 if [ "${GITHUB_REF#refs/tags/}" != "$GITHUB_REF" ]; then
You can’t perform that action at this time.
0 commit comments