feat: Add command for autogenerating boilerplate code #31
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 distributions | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- v* | |
jobs: | |
build-and-publish: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install --upgrade setuptools | |
python -m pip install poetry | |
python -m pip install twine | |
python -m poetry install | |
- name: Build and publish to Test PyPI | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.TEST_PYPI }} | |
run: | | |
python -m poetry build | |
twine upload --skip-existing --repository-url https://test.pypi.org/legacy/ dist/* | |
- name: Publish to PyPI (if it's a new tag) | |
if: github.ref == 'refs/heads/master' | |
env: | |
TWINE_USERNAME: __token__ | |
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} | |
run: | | |
python -m poetry build | |
twine upload dist/* |