From 20608ac606c947a728b4cf4f27b50cc3ae79aa27 Mon Sep 17 00:00:00 2001 From: "S.Cao-office" Date: Tue, 23 Apr 2024 10:55:40 -0500 Subject: [PATCH] update gh actions --- .github/workflows/python-publish.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 1c0ee8e..7a852f1 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -9,8 +9,9 @@ name: Publish Python 🐍 distributions 📦 to PyPI on: - release: - types: [published] + push: + tags: + - '*' jobs: build-n-publish: @@ -37,12 +38,15 @@ jobs: - name: Update version in setup.py run: >- sed -i "s/{{VERSION_PLACEHOLDER}}/${{ steps.tag.outputs.TAG_NAME }}/g" setup.py + + - name: Install build + run: python -m pip install build - name: Build a binary wheel and a source tarball run: python -m build --sdist --wheel --outdir dist/ - name: Publish distribution 📦 to PyPI - uses: pypa/gh-action-pypi-publish@main + uses: pypa/gh-action-pypi-publish@master with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file