Skip to content

Commit 34c3100

Browse files
committed
fix: read permission for realease workflow
1 parent 986e48b commit 34c3100

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

.github/workflows/release.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ on:
1010
jobs:
1111
detect-package:
1212
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
1315
outputs:
1416
package: ${{ steps.detect.outputs.package }}
1517
version: ${{ steps.detect.outputs.version }}
1618
package-dir: ${{ steps.detect.outputs.package-dir }}
1719
steps:
1820
- name: Checkout Repository
1921
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 0
2024

2125
- name: Setup Python
2226
uses: actions/setup-python@v5
@@ -53,10 +57,13 @@ jobs:
5357
needs: [detect-package]
5458
environment: pypi-release
5559
permissions:
60+
contents: read
5661
id-token: write
5762
steps:
5863
- name: Checkout Repository
5964
uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0
6067

6168
- name: Setup Python
6269
uses: actions/setup-python@v5
@@ -71,7 +78,7 @@ jobs:
7178

7279
- name: Build package
7380
run: |
74-
uv build --package ${PACKAGE}
81+
uv build --package ${{ needs.detect-package.outputs.package }}
7582
7683
- name: Publish to PyPI
7784
run: |

0 commit comments

Comments
 (0)