Skip to content

Commit

Permalink
ci: add zizmor pre-commit hook and fix issues (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
radoering authored Dec 10, 2024
1 parent 7ac1bf1 commit 3e77909
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:
shell: bash
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- run: pipx run build

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

- uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: distfiles
path: dist/

- run: gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}
- run: gh release upload "${TAG_NAME}" dist/*.{tar.gz,whl}
env:
GH_TOKEN: ${{ github.token }}
TAG_NAME: ${{ github.event.release.tag_name }}

upload-pypi:
name: Upload (PyPI)
Expand Down
8 changes: 8 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ repos:
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/woodruffw/zizmor-pre-commit
rev: v0.8.0
hooks:
- id: zizmor
# types and files can be removed with https://github.com/woodruffw/zizmor-pre-commit/pull/2
types: [yaml]
files: \.github/workflows/.*$

0 comments on commit 3e77909

Please sign in to comment.