From db9eb4a13afd55c526873ebf5971858ed36dc2ac Mon Sep 17 00:00:00 2001 From: kitagawa-hr Date: Tue, 18 May 2021 20:19:35 +0900 Subject: [PATCH] Add publish_pypi action --- .github/workflows/publish_pypi.yml | 32 ++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/publish_pypi.yml diff --git a/.github/workflows/publish_pypi.yml b/.github/workflows/publish_pypi.yml new file mode 100644 index 0000000..f67ef84 --- /dev/null +++ b/.github/workflows/publish_pypi.yml @@ -0,0 +1,32 @@ +name: publish_pypi + +on: + release: + types: created + +jobs: + release: + name: Publish to PyPI + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Python 3.8 + uses: actions/setup-python@v2 + with: + python-version: "3.8" + + - name: Install Poetry + uses: abatilo/actions-poetry@v2.0.0 + with: + poetry-version: 1.1.6 + + - name: Build + run: poetry build + + - name: Upload + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + run: poetry publish