From 77531dd99eec386eb610367e949c284d8b70e3e5 Mon Sep 17 00:00:00 2001 From: Thiago Pena Date: Sun, 5 May 2024 09:43:44 -0300 Subject: [PATCH] feat: Configures trusted publishing release --- .github/workflows/main.yml | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 09ccf95..04d9bf6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -101,8 +101,10 @@ jobs: jobs: ${{ toJSON(needs) }} release: + environment: release permissions: contents: write + id-token: write needs: - check if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') @@ -116,8 +118,11 @@ jobs: python-version: 3.x - name: Install tox run: python -m pip install tox - - name: Run - run: tox -e release + - name: Build + run: tox -e release exec -- python -m build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + - name: GitHub Release env: - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: tox -e release exec -- python -m jaraco.develop.create-github-release