ci: publish to PyPI using trusted publishing

closes #1491
This commit is contained in:
Willi Ballenthin
2023-07-10 02:06:06 +02:00
parent cb289e3fc5
commit 81b964386f

View File

@@ -26,5 +26,20 @@ jobs:
- name: build package
run: |
python setup.py sdist bdist_wheel
- name: upload package artifacts
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
with:
name: ${{ matrix.asset_name }}
path: dist/*
- name: upload package to GH Release
uses: svenstaro/upload-release-action@2728235f7dc9ff598bd86ce3c274b74f802d2208 # v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN}}
file: dist/*
tag: ${{ github.ref }}
- name: publish package
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@f5622bde02b04381239da3573277701ceca8f6a0 # release/v1
with:
skip-existing: true
verbose: true
print-hash: true