From 04f958d1bac1f1a4d545126af765c3a520d56e5b Mon Sep 17 00:00:00 2001 From: Alvaro Lopez Garcia Date: Thu, 8 Aug 2024 16:28:46 +0200 Subject: [PATCH 1/2] Revert "ci: fix package build, using trusted publisher" This reverts commit f619ebdf54afc6c0ab4264de2f8874176caacf35. --- .github/workflows/python-publish.yml | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index 3b536c96..fc29fc0f 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -32,13 +32,8 @@ jobs: run: tox publish: - name: upload release to PyPI runs-on: ubuntu-latest needs: test - environment: release - permissions: - # IMPORTANT: this permission is mandatory for trusted publishing - id-token: write steps: - uses: actions/checkout@v3 @@ -52,9 +47,11 @@ jobs: python -m pip install --upgrade pip python -m pip install poetry poetry poetry-plugin-export - - name: Build - run: poetry build - - - name: publish - uses: pypa/gh-action-pypi-publish@release/v1 + - name: Build and publish + env: + TWINE_USERNAME: "__token__" + TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + run: | + poetry build + poetry publish From 0b7864a4715daa176d090e5a546d68fbde52d5cf Mon Sep 17 00:00:00 2001 From: Alvaro Lopez Garcia Date: Thu, 8 Aug 2024 16:30:19 +0200 Subject: [PATCH 2/2] ci: fix CI build and publish --- .github/workflows/ci.yml | 2 +- .github/workflows/python-publish.yml | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2ebfc365..53040543 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: Python package +name: CI tests via tox on: push: diff --git a/.github/workflows/python-publish.yml b/.github/workflows/python-publish.yml index fc29fc0f..bd7291fe 100644 --- a/.github/workflows/python-publish.yml +++ b/.github/workflows/python-publish.yml @@ -49,8 +49,7 @@ jobs: - name: Build and publish env: - TWINE_USERNAME: "__token__" - TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }} + POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }} run: | poetry build poetry publish