Skip to content

Commit 37d545a

Browse files
authored
ci: use trusted publishers and sign releases (#254)
Signed-off-by: Michele Dolfi <[email protected]>
1 parent 928e5c5 commit 37d545a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/pypi.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,17 @@ env:
1414
jobs:
1515
build-and-publish:
1616
runs-on: ubuntu-latest
17+
environment:
18+
name: pypi
19+
url: https://pypi.org/p/docling-core
20+
permissions:
21+
id-token: write # IMPORTANT: mandatory for trusted publishing
1722
steps:
18-
- uses: actions/checkout@v3
23+
- uses: actions/checkout@v4
1924
- uses: ./.github/actions/setup-poetry
2025
- name: Build and publish
21-
run: poetry publish --build --no-interaction --username=__token__ --password=${{ secrets.PYPI_TOKEN }}
26+
run: poetry publish build
27+
- name: Publish distribution 📦 to PyPI
28+
uses: pypa/gh-action-pypi-publish@release/v1
29+
with:
30+
attestations: true

0 commit comments

Comments
 (0)