Skip to content

Merge pull request #77 from small-thinking/add-codegen-2 #43

Merge pull request #77 from small-thinking/add-codegen-2

Merge pull request #77 from small-thinking/add-codegen-2 #43

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 }}