File tree Expand file tree Collapse file tree 1 file changed +18
-3
lines changed
Expand file tree Collapse file tree 1 file changed +18
-3
lines changed Original file line number Diff line number Diff line change 66 push :
77 branches :
88 - release/**
9+ workflow_dispatch :
910
1011permissions :
1112 contents : write
1213 packages : write
1314
1415jobs :
1516 release :
16- if : github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/')
17+ if : >-
18+ github.event_name == 'workflow_dispatch' ||
19+ (github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'release/'))
1720 name : Create Release
1821 runs-on : ubuntu-24.04-arm
1922 steps :
3538 run : |
3639 task lint
3740 task git:set-config
38- task version:tag-release
39- echo "REL_VERSION=$(task version:get)" >> "$GITHUB_OUTPUT"
41+ REL_VERSION="$(task version:get)"
42+ echo "REL_VERSION=${REL_VERSION}" >> "$GITHUB_OUTPUT"
43+
44+ full_remote_sha="$(git ls-remote --tags origin "refs/tags/${REL_VERSION}" 2>/dev/null | awk '{print $1}' || true)"
45+ if [ -n "${full_remote_sha}" ]; then
46+ if [ "${GITHUB_EVENT_NAME}" = "workflow_dispatch" ]; then
47+ echo "ℹ️ INFO: Full tag '${REL_VERSION}' already exists; skipping tag creation."
48+ else
49+ echo "❌ ERROR: Full tag '${REL_VERSION}' already exists; aborting" >&2
50+ exit 1
51+ fi
52+ else
53+ task version:tag-release
54+ fi
4055
4156 - name : Install Docker Buildx
4257 uses : docker/setup-buildx-action@v3
You can’t perform that action at this time.
0 commit comments