Always push #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Python 🐍 package | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- 'v*' | |
jobs: | |
build-n-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python 3.10 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.10" | |
- name: Build distribution | |
run: make build_pkg | |
- name: Publish distribution 📦 to PyPI | |
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.pypi_password }} | |
- name: Publish distribution 📦 to Test PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.test_pypi_password }} | |
repository_url: https://test.pypi.org/legacy/ |