Skip to content

Commit 1f457da

Browse files
mikasenghaasclaude
andauthored
chore: make stable release manual-dispatch only (#2085)
Remove the vX.Y.Z tag push trigger from the publish workflow; pushing release tags is not permitted, so stable releases are cut only via workflow_dispatch with an existing tag. The main-branch dev pre-release path is unchanged. Also drops the now-dead tag-push code paths in the build-tag job. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7ef6458 commit 1f457da

1 file changed

Lines changed: 6 additions & 22 deletions

File tree

.github/workflows/publish-verifiers.yml

Lines changed: 6 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name: Publish verifiers
44
# - Every push to `main` publishes a pre-release for the next release: the last
55
# `vX.Y.Z` tag with its final segment bumped, plus `.dev<N>` where N = commits
66
# since that tag (e.g. `v0.1.14` -> `0.1.15.dev<N>`). No per-commit tags created.
7-
# - Pushing a `vX.Y.Z` tag (or dispatching with one) publishes that exact stable
7+
# - Dispatching with an existing `vX.Y.Z` tag publishes that exact stable
88
# release to PyPI and creates a GitHub release.
99

1010
on:
@@ -17,9 +17,6 @@ on:
1717
push:
1818
branches:
1919
- main
20-
tags:
21-
- 'v[0-9]*.[0-9]*.[0-9]*'
22-
- '!v[0-9]*dev*' # `.dev` tags are auto-versioning artifacts, not releases
2320

2421
concurrency:
2522
group: publish-verifiers-${{ github.ref }}
@@ -73,40 +70,27 @@ jobs:
7370
with:
7471
skip-existing: true
7572

76-
# Stable release: a pushed `vX.Y.Z` tag or a manual dispatch with an existing tag.
73+
# Stable release: a manual dispatch with an existing tag.
7774
build-tag:
78-
if: github.event_name == 'workflow_dispatch' || startsWith(github.ref, 'refs/tags/v')
75+
if: github.event_name == 'workflow_dispatch'
7976
runs-on: ubuntu-latest
8077
permissions:
8178
contents: read
8279
outputs:
8380
tag: ${{ steps.release.outputs.tag }}
8481
steps:
85-
- name: Checkout tagged release (dispatch)
86-
if: github.event_name == 'workflow_dispatch'
82+
- name: Checkout tagged release
8783
uses: actions/checkout@v5
8884
with:
8985
fetch-depth: 0
9086
ref: refs/tags/${{ inputs.tag }}
9187

92-
- name: Checkout tagged release (push)
93-
if: github.event_name != 'workflow_dispatch'
94-
uses: actions/checkout@v5
95-
with:
96-
fetch-depth: 0
97-
9888
- name: Resolve release tag
9989
id: release
10090
env:
101-
EVENT_NAME: ${{ github.event_name }}
102-
PUSHED_REF: ${{ github.ref_name }}
103-
INPUT_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || '' }}
91+
INPUT_TAG: ${{ inputs.tag }}
10492
run: |
105-
if [ "$EVENT_NAME" = "workflow_dispatch" ]; then
106-
TAG="$INPUT_TAG"
107-
else
108-
TAG="$PUSHED_REF"
109-
fi
93+
TAG="$INPUT_TAG"
11094
11195
if [[ ! "$TAG" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
11296
echo "Release tags must look like 'vX.Y.Z' (received '$TAG')" >&2

0 commit comments

Comments
 (0)