Skip to content

Commit

Permalink
ci/publish: tighten permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Oct 31, 2024
1 parent 714cdee commit 3187b01
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/pypi-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ on:
- published
workflow_dispatch:

permissions:
attestations: write
contents: read
id-token: write

env:
FORCE_COLOR: "1" # Make tools pretty.
PIP_DISABLE_PIP_VERSION_CHECK: "1"
PIP_NO_PYTHON_VERSION_WARNING: "1"


jobs:
# Always build & lint package.
build-package:
name: Build & verify package
runs-on: ubuntu-latest
permissions:
attestations: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false

- uses: hynek/build-and-inspect-python-package@v2
with:
Expand All @@ -43,6 +43,10 @@ jobs:
runs-on: ubuntu-latest
needs: build-package

permissions:
contents: read
id-token: write

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
Expand Down

0 comments on commit 3187b01

Please sign in to comment.