diff --git a/.github/workflows/pypi.yaml b/.github/workflows/pypi.yaml index 6e69984dc00..e8f032b44ec 100644 --- a/.github/workflows/pypi.yaml +++ b/.github/workflows/pypi.yaml @@ -2,9 +2,8 @@ name: Publish package to PyPi on: push: - branches: - - main - # - test/branch # Uncomment and replace with the branch you are testing on + tags: + - v* jobs: build-release: runs-on: ubuntu-latest @@ -25,17 +24,7 @@ jobs: - name: Build package run: | python -m build --no-isolation - echo ${{ github.event_name }} - echo ${{ github.ref }} - # - name: Publish package to Test PyPI - # uses: pypa/gh-action-pypi-publish@release/v1.5.1 - # with: - # user: __token__ - # repository_url: https://test.pypi.org/legacy/ - # password: ${{ secrets.TEST_PYPI_API_TOKEN }} - name: Publish package to PyPI -# if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') - if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 with: user: __token__ diff --git a/.github/workflows/sphinx_docs_to_gh_pages.yaml b/.github/workflows/sphinx_docs_to_gh_pages.yaml index 29cb21671fe..636659fdb10 100644 --- a/.github/workflows/sphinx_docs_to_gh_pages.yaml +++ b/.github/workflows/sphinx_docs_to_gh_pages.yaml @@ -3,8 +3,8 @@ name: Sphinx docs to gh-pages on: push: - branches: - - main + tags: + - v* # workflow_dispatch: # Un comment line if you also want to trigger action manually