Skip to content
This repository has been archived by the owner on Sep 22, 2023. It is now read-only.

chore: protos for chain v0.21.9 (#27) #19

chore: protos for chain v0.21.9 (#27)

chore: protos for chain v0.21.9 (#27) #19

name: Publish Python 🐍 distributions 📦 to PyPI and TestPyPI
on:
push:
branches: ["main"]
tags: ["v*"]
jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9.13
uses: actions/setup-python@v3
with:
python-version: "3.9.13"
- name: Install poetry
uses: abatilo/actions-poetry@v2
with:
poetry-version: 1.3.2
- name: Build a binary wheel and a source tarball
run: poetry build
- name: Configure testpypi repository
run: poetry config repositories.testpypi https://test.pypi.org/legacy/
- name: Publish distribution 📦 to Test PyPI
run: poetry publish --skip-existing -r testpypi -u __token__ -p ${{ secrets.TEST_PYPI_API_TOKEN }}
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}