diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 4c820f9..9b8b506 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -4,9 +4,8 @@ name: Upload Python Package on: - push: - branches: - - master + release: + types: [created] jobs: deploy: @@ -14,19 +13,19 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '3.x' - name: Install dependencies run: | python -m pip install --upgrade pip - pip install setuptools wheel twine build - - name: Build and publish + pip install setuptools wheel twine + - name: Build package + run: python -m build + - name: Publish package env: TWINE_USERNAME: '__token__' TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} - run: | - python -m build - twine upload --repository testpypi dist/* + run: twine upload --repository testpypi dist/*