From 2eff3994a9bbf449c539208a20c3a39f9a171ec2 Mon Sep 17 00:00:00 2001 From: linkmluser Date: Fri, 2 Feb 2024 17:35:29 -0800 Subject: [PATCH] pypi --- .github/workflows/pypi-publish.yml | 40 ++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/pypi-publish.yml diff --git a/.github/workflows/pypi-publish.yml b/.github/workflows/pypi-publish.yml new file mode 100644 index 0000000..512fb4b --- /dev/null +++ b/.github/workflows/pypi-publish.yml @@ -0,0 +1,40 @@ +--- +name: Publish Python Package + +on: + release: + types: [created] + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + + - name: Install Poetry + run: | + pip install poetry + poetry self add "poetry-dynamic-versioning[plugin]" + # uses: snok/install-poetry@v1.1.6 + # with: + # virtualenvs-create: true + # virtualenvs-in-project: true + + # - name: Install dependencies + # run: poetry install --no-interaction + + - name: Build source and wheel archives + run: poetry build + + - name: Publish distribution 📦 to PyPI + uses: pypa/gh-action-pypi-publish@v1.2.2 + with: + user: __token__ + password: ${{ secrets.PYPI_PASSWORD }}