44 push :
55 tags :
66 - " v*.*.*"
7- workflow_dispatch :
8- inputs :
9- tag :
10- description : Existing release tag to publish
11- required : true
12- type : choice
13- options :
14- - v0.1.0
157
168permissions :
179 contents : read
1810
1911concurrency :
20- group : release-${{ inputs.tag || github.ref_name }}
12+ group : release-${{ github.ref_name }}
2113 cancel-in-progress : false
2214
2315env :
24- RELEASE_TAG : ${{ inputs.tag || github.ref_name }}
16+ RELEASE_TAG : ${{ github.ref_name }}
2517
2618jobs :
2719 build :
@@ -31,21 +23,13 @@ jobs:
3123 with :
3224 fetch-depth : 0
3325 persist-credentials : false
34- ref : ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
3526 - name : Verify release commit
3627 run : |
3728 git fetch --no-tags origin main:refs/remotes/origin/main
3829 release_sha=$(git rev-parse HEAD)
39- tag_object=$(git rev-parse --verify "refs/tags/${RELEASE_TAG}")
4030 tag_sha=$(git rev-parse --verify "refs/tags/${RELEASE_TAG}^{commit}")
4131 test "$release_sha" = "$tag_sha"
4232 git merge-base --is-ancestor "$release_sha" origin/main
43- if [[ "$GITHUB_EVENT_NAME" == "workflow_dispatch" ]]; then
44- test "$GITHUB_REF" = "refs/heads/main"
45- test "$RELEASE_TAG" = "v0.1.0"
46- test "$tag_object" = "1bac90e875b7373fe391f7fbe359783ef545a522"
47- test "$release_sha" = "82f510c3a40aa576bfeef277dd406d42b788250b"
48- fi
4933 - uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
5034 with :
5135 python-version : " 3.12"
@@ -171,7 +155,7 @@ jobs:
171155 pqviewer --no-open --port 8765 > pqviewer.log 2>&1 &
172156 server_pid=$!
173157 trap 'kill "$server_pid" 2>/dev/null || true' EXIT
174- for attempt in {1..30}; do
158+ for _ in {1..30}; do
175159 if curl --fail --silent http://127.0.0.1:8765/api/health > /dev/null; then
176160 break
177161 fi
@@ -193,10 +177,6 @@ jobs:
193177 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
194178 with :
195179 persist-credentials : false
196- ref : ${{ inputs.tag && format('refs/tags/{0}', inputs.tag) || github.ref }}
197- - name : Verify recovery source
198- if : github.event_name == 'workflow_dispatch'
199- run : test "$(git rev-parse HEAD)" = "82f510c3a40aa576bfeef277dd406d42b788250b"
200180 - uses : actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
201181 with :
202182 python-version : " 3.12"
@@ -264,8 +244,8 @@ jobs:
264244 env :
265245 GH_TOKEN : ${{ github.token }}
266246 run : |
267- cd dist
268- sha256sum *.whl *.tar.gz > SHA256SUMS
247+ cd dist || exit 1
248+ sha256sum ./ *.whl ./ *.tar.gz > SHA256SUMS
269249 release_flags=()
270250 if [[ "$RELEASE_TAG" =~ (a|b|rc)[0-9]+$ ]]; then
271251 release_flags+=(--prerelease)
0 commit comments