Skip to content

Commit 6ef47e2

Browse files
Merge pull request #304 from AikidoSec/fix-poetry-safer-publishing
Fix: poetry now has stricter publishing requirements, move to recommended publishing strategy
2 parents b89f197 + ee41390 commit 6ef47e2

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

.github/workflows/publish.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ name: Publish Python 🐍 distribution 📦 to PyPI
33
on:
44
release:
55
types: [created]
6-
6+
permissions:
7+
id-token: write
78
jobs:
89
tests:
910
name: Linting and running tests
@@ -54,13 +55,8 @@ jobs:
5455
make replace_version version=${TAG_NAME#v}
5556
- name: Download binaries & build
5657
run: make build
57-
- name: Publish to PyPI
58-
env:
59-
POETRY_HTTP_BASIC_PYPI_USERNAME: __token__
60-
POETRY_HTTP_BASIC_PYPI_PASSWORD: ${{ secrets.PYPI_TOKEN }}
61-
run: |
62-
poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
63-
poetry publish --build
58+
- name: Publish package distributions to PyPI
59+
uses: pypa/gh-action-pypi-publish@release/v1
6460
- name: Store the distribution packages
6561
uses: actions/upload-artifact@v3
6662
with:

0 commit comments

Comments
 (0)