From 2f4bd6a0c9244d0c6776ced48d62bc591ca3de2a Mon Sep 17 00:00:00 2001 From: Matthias Date: Mon, 2 Dec 2024 20:03:39 +0100 Subject: [PATCH] chore: split pypi and pypi test jobs to enable proper attestation Related: https://github.com/pypa/gh-action-pypi-publish/issues/283 --- .github/workflows/ci.yml | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5024a34fe..f42816561 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -517,14 +517,14 @@ jobs: ft_client/dist retention-days: 10 - deploy-pypi: - name: "Deploy to PyPI" + deploy-test-pypi: + name: "Publish Python 🐍 distribution 📦 to TestPyPI" needs: [ build ] runs-on: ubuntu-22.04 if: (github.event_name == 'release') environment: - name: release - url: https://pypi.org/p/freqtrade + name: testpypi + url: https://test.pypi.org/p/freqtrade permissions: id-token: write @@ -538,12 +538,33 @@ jobs: path: dist merge-multiple: true - - name: Publish to PyPI (Test) uses: pypa/gh-action-pypi-publish@v1.12.2 with: repository-url: https://test.pypi.org/legacy/ + + deploy-pypi: + name: "Publish Python 🐍 distribution 📦 to PyPI" + needs: [ build ] + runs-on: ubuntu-22.04 + if: (github.event_name == 'release') + environment: + name: pypi + url: https://pypi.org/p/freqtrade + permissions: + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Download artifact 📦 + uses: actions/download-artifact@v4 + with: + pattern: freqtrade*-build + path: dist + merge-multiple: true + - name: Publish to PyPI uses: pypa/gh-action-pypi-publish@v1.12.2