Skip to content

Commit e544ab9

Browse files
committed
Switch to Trusted Publishing for PyPI packages
1 parent 0db0f1e commit e544ab9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

.github/workflows/swan-ci-ca.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,14 @@ on:
88
push:
99
tags:
1010
- '*/v*'
11-
11+
1212
jobs:
1313
build-publish:
1414

1515
runs-on: ubuntu-latest
16+
environment: publish
17+
permissions:
18+
id-token: write
1619

1720
steps:
1821
- uses: actions/checkout@v2
@@ -40,13 +43,10 @@ jobs:
4043
cd $PACKAGE_NAME
4144
uv build
4245
43-
- name: Publish distribution to PyPI
44-
env:
45-
TWINE_USERNAME: __token__
46-
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
47-
run: |
48-
cd $PACKAGE_NAME
49-
twine upload --repository pypi dist/*
46+
- name: Publish distribution to PyPI 🚀
47+
uses: pypa/gh-action-pypi-publish@release/v1
48+
with:
49+
package-dir: ./${{ env.PACKAGE_NAME }}/dist/
5050

5151
- name: Create Release
5252
id: create_release

0 commit comments

Comments
 (0)