From 81b964386f1fc01a54b8022ea10cb566908023e4 Mon Sep 17 00:00:00 2001 From: Willi Ballenthin Date: Mon, 10 Jul 2023 02:06:06 +0200 Subject: [PATCH] ci: publish to PyPI using trusted publishing closes #1491 --- .github/workflows/publish.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 69b1c68b..e49acf80 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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