Skip to content

Commit bb9e242

Browse files
committed
Fix publishing
1 parent 0f05b6d commit bb9e242

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ on:
77
jobs:
88
build-and-publish:
99
runs-on: ubuntu-latest
10+
environment:
11+
name: pypi
12+
url: https://pypi.org/p/python-jsonstore
13+
permissions:
14+
id-token: write
1015
steps:
1116
- uses: actions/checkout@v4
1217
- name: Set up Python
@@ -17,7 +22,7 @@ jobs:
1722
run: |
1823
python -m pip install --upgrade pip build
1924
python -m build
25+
# the publishing uses PyPI's trusted publishing, so configured on pypi instead of using secrets
2026
- name: Publish to PyPI
21-
uses: pypa/gh-action-pypi-publish@v1
22-
with:
23-
password: ${{ secrets.PYPI_API_TOKEN }}
27+
uses: pypa/gh-action-pypi-publish@release/v1
28+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')

0 commit comments

Comments
 (0)