publish-to-test-pypi.yml 911 B

12345678910111213141516171819202122232425262728293031
  1. name: Build and publish bandcamp-downloader to TestPyPI
  2. on:
  3. push:
  4. branches:
  5. - master
  6. jobs:
  7. build-and-publish:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout
  11. uses: actions/checkout@v2
  12. - name: Set up Python 3.10
  13. uses: actions/setup-python@v2
  14. with:
  15. python-version: "3.10"
  16. - name: Install dependencies
  17. run: python -m pip install -U setuptools wheel build
  18. - name: Build a binary wheel and a source tarball
  19. run: python -m build .
  20. - name: Publish distribution to TestPyPI
  21. uses: pypa/gh-action-pypi-publish@master
  22. with:
  23. password: ${{ secrets.TEST_PYPI_API_TOKEN }}
  24. repository_url: https://test.pypi.org/legacy/
  25. #- name: Publish distribution to PyPI
  26. # if: startsWith(github.ref, 'refs/tags')
  27. # uses: pypa/gh-action-pypi-publish@master
  28. # with:
  29. # password: ${{ secrets.PYPI_API_TOKEN }}