Skip to content

Commit f9ebe4f

Browse files
committed
verify tagging in release, tighten up global perms
1 parent 137f5b1 commit f9ebe4f

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

.github/workflows/debug.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Debug
22

3+
permissions:
4+
contents: read
5+
36
on:
47
workflow_dispatch:
58
inputs:

.github/workflows/lint.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Lint
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
pull_request:

.github/workflows/release.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,14 @@ jobs:
6565
# verify version
6666
just verify_version $TAG_NAME
6767
68+
# check that github has marked the tag as verified
69+
export TAG_URL=`curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" https://api.github.com/repos/${{ github.repository_owner }}/${{ github.repository }}/git/refs/tags/$TAG_NAME | jq -r ".object.url"`
70+
result=$(curl -s -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" "$TAG_URL" | jq -r ".verification.verified")
71+
if [ "$result" != "true" ]; then
72+
echo "Error: Tag verification failed." >&2
73+
exit 1
74+
fi
75+
6876
# export the release version
6977
echo "RELEASE_VERSION=${TAG_NAME}" >> $GITHUB_ENV
7078
- name: Build the binary wheel and a source tarball

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Test
22

3+
permissions:
4+
contents: read
5+
36
on:
47
push:
58
pull_request:

justfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ coverage:
206206
run +ARGS:
207207
uv run {{ ARGS }}
208208

209-
210209
# validate the given version string against the lib version
211210
[script]
212211
validate_version VERSION:
@@ -219,6 +218,6 @@ validate_version VERSION:
219218

220219
# issue a relase for the given semver string (e.g. 2.1.0)
221220
release VERSION:
222-
@just _validate_version {{ VERSION }}
221+
@just validate_version {{ VERSION }}
223222
git tag -s v{{ VERSION }} -m "{{ VERSION }} Release"
224223
git push origin {{ VERSION }}

0 commit comments

Comments
 (0)