Skip to content

Commit 49f0b6c

Browse files
committed
fix permission for token for release
1 parent 0424572 commit 49f0b6c

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
name: Release webdav4
22

33
on:
4-
push:
5-
branches:
6-
- main
74
release:
8-
types:
9-
- released
5+
types: [published]
6+
workflow_dispatch:
107

118
permissions: {}
129

@@ -16,6 +13,9 @@ env:
1613
jobs:
1714
build-and-publish:
1815
timeout-minutes: 5
16+
permissions:
17+
contents: read
18+
id-token: write
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v4
@@ -26,9 +26,6 @@ jobs:
2626
with:
2727
python-version: 3.8
2828

29-
- run: pip install build
30-
- run: python -m build
31-
32-
- name: Publish to PyPI
33-
if: github.event_name == 'release'
29+
- run: pipx run build
30+
- if: github.event_name == 'release'
3431
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)