From 01a32d777a4f7614cd23a0c3b5d6aaa8a58bd6ca Mon Sep 17 00:00:00 2001 From: Trapsilo Bumi Date: Sun, 22 Jan 2023 19:16:08 +0700 Subject: [PATCH] Upload to PyPI with Github Actions (#40) --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..42516f5 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: Upload to PyPI +on: + release: + types: [published] + +jobs: + upload-to-pypi: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install Poetry + run: pipx install poetry==1.3.2 + + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: "3.11" + cache: "poetry" + + - name: Upload to PyPI + env: + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} + run: poetry --build publish