Merge pull request #85 from small-thinking/fix-minor-issue-2 #47
Workflow file for this run
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: | |
tags: | |
- 'v*' # Match tags for production releases | |
- 'test-*' # Match tags for test releases | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.9' | |
- name: Install Poetry | |
run: | | |
python -m pip install --upgrade pip | |
pip install poetry | |
- name: Build package | |
run: poetry build | |
- name: Publish to Test PyPI | |
if: startsWith(github.ref, 'refs/tags/test-') | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | |
repository_url: https://test.pypi.org/legacy/ | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: pypa/[email protected] | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |