Skip to content

Commit 3187b01

Browse files
committed
ci/publish: tighten permissions
1 parent 714cdee commit 3187b01

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

Diff for: .github/workflows/pypi-package.yml

+8-4
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,26 @@ on:
1010
- published
1111
workflow_dispatch:
1212

13-
permissions:
14-
attestations: write
15-
contents: read
16-
id-token: write
1713

1814
env:
1915
FORCE_COLOR: "1" # Make tools pretty.
2016
PIP_DISABLE_PIP_VERSION_CHECK: "1"
2117
PIP_NO_PYTHON_VERSION_WARNING: "1"
2218

19+
2320
jobs:
2421
# Always build & lint package.
2522
build-package:
2623
name: Build & verify package
2724
runs-on: ubuntu-latest
25+
permissions:
26+
attestations: write
2827

2928
steps:
3029
- uses: actions/checkout@v4
3130
with:
3231
fetch-depth: 0
32+
persist-credentials: false
3333

3434
- uses: hynek/build-and-inspect-python-package@v2
3535
with:
@@ -43,6 +43,10 @@ jobs:
4343
runs-on: ubuntu-latest
4444
needs: build-package
4545

46+
permissions:
47+
contents: read
48+
id-token: write
49+
4650
steps:
4751
- name: Download packages built by build-and-inspect-python-package
4852
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)