From 2f78a9158fb6d17e9d6f373675c89d8160f9fb55 Mon Sep 17 00:00:00 2001 From: Fabian Braun Date: Tue, 23 Jul 2024 09:49:15 +0200 Subject: [PATCH] Update pypi actions --- .github/workflows/publish-to-live-pypi.yml | 16 +++++++++------- .github/workflows/publish-to-test-pypi.yml | 18 +++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/publish-to-live-pypi.yml b/.github/workflows/publish-to-live-pypi.yml index 8f95f0f5..8e0f9bf0 100644 --- a/.github/workflows/publish-to-live-pypi.yml +++ b/.github/workflows/publish-to-live-pypi.yml @@ -9,12 +9,17 @@ jobs: build-n-publish: name: Build and publish 📦 to pypi runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/djangocms-link + permissions: + id-token: write steps: - - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Install pypa/build run: >- @@ -34,6 +39,3 @@ jobs: - name: Publish 📦 to PyPI if: startsWith(github.ref, 'refs/tags') uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index d48d245a..1a63042d 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -9,12 +9,17 @@ jobs: build-n-publish: name: Build and publish 📦 to TestPyPI runs-on: ubuntu-latest + environment: + name: pypi + url: https://test.pypi.org/p/djangocms-link + permissions: + id-token: write steps: - - uses: actions/checkout@master - - name: Set up Python 3.10 - uses: actions/setup-python@v1 + - uses: actions/checkout@v4 + - name: Set up Python 3.12 + uses: actions/setup-python@v5 with: - python-version: '3.10' + python-version: '3.12' - name: Install pypa/build run: >- @@ -33,8 +38,3 @@ jobs: - name: Publish 📦 to Test PyPI uses: pypa/gh-action-pypi-publish@release/v1 - with: - user: __token__ - password: ${{ secrets.TEST_PYPI_API_TOKEN }} - repository_url: https://test.pypi.org/legacy/ - skip_existing: true