From c2c231d7f225a6eb1faea53bdb26d1891d8704a9 Mon Sep 17 00:00:00 2001 From: Ryan Littlefield Date: Tue, 4 Jun 2024 17:59:52 +0000 Subject: [PATCH] getting automatic main release set up for pypi --- .github/workflows/main.yml | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b2f1f1a..26f2f39 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,5 +50,36 @@ jobs: run: | poetry install poetry run python -m pytest - - + release: + name: "Build and Release" + runs-on: ubuntu-latest + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishin + environment: + name: release + url: https://pypi.org/p/paseto + needs: + - test + - safety-check + - lint + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: "3.12" + architecture: 'x64' + - name: Install poetry + uses: abatilo/actions-poetry@v2.1.4 + with: + poetry-version: "1.8.3" + - name: dependency checks + run: | + poetry check + - name: install dependencies + run: | + poetry install + - name: build + run: | + poetry build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1