Skip to content

Commit 5124fb9

Browse files
authored
ci: add zizmor pre-commit hook and fix issues (#125)
1 parent d06f865 commit 5124fb9

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

.github/workflows/main.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ jobs:
3131
shell: bash
3232
steps:
3333
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
34+
with:
35+
persist-credentials: false
3436

3537
- name: Set up Python ${{ matrix.python-version }}
3638
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0

.github/workflows/release.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
13+
with:
14+
persist-credentials: false
1315

1416
- run: pipx run build
1517

@@ -28,15 +30,18 @@ jobs:
2830
steps:
2931
# We need to be in a git repo for gh to work.
3032
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
33+
with:
34+
persist-credentials: false
3135

3236
- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
3337
with:
3438
name: distfiles
3539
path: dist/
3640

37-
- run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
41+
- run: gh release upload "${TAG_NAME}" dist/*.{tar.gz,whl}
3842
env:
3943
GH_TOKEN: ${{ github.token }}
44+
TAG_NAME: ${{ github.event.release.tag_name }}
4045

4146
upload-pypi:
4247
name: Upload (PyPI)

.pre-commit-config.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ repos:
2323
hooks:
2424
- id: ruff
2525
- id: ruff-format
26+
27+
- repo: https://github.com/woodruffw/zizmor-pre-commit
28+
rev: v0.8.0
29+
hooks:
30+
- id: zizmor
31+
# types and files can be removed with https://github.com/woodruffw/zizmor-pre-commit/pull/2
32+
types: [yaml]
33+
files: \.github/workflows/.*$

0 commit comments

Comments
 (0)