Skip to content

Commit 2936a92

Browse files
authored
chore: update pypi actions to use trusted publishers (#213)
1 parent fbed89f commit 2936a92

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

.github/workflows/publish-to-live-pypi.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@ jobs:
99
build-n-publish:
1010
name: Build and publish Python 🐍 distributions 📦 to pypi
1111
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
1214
steps:
1315
- uses: actions/checkout@v4
14-
- name: Set up Python 3.10
16+
- name: Set up Python 3.12
1517
uses: actions/setup-python@v5
1618
with:
17-
python-version: '3.10'
19+
python-version: '3.12'
1820

1921
- name: Install pypa/build
2022
run: >-
@@ -34,6 +36,3 @@ jobs:
3436
- name: Publish distribution 📦 to PyPI
3537
if: startsWith(github.ref, 'refs/tags')
3638
uses: pypa/gh-action-pypi-publish@release/v1
37-
with:
38-
user: __token__
39-
password: ${{ secrets.PYPI_API_TOKEN }}

.github/workflows/publish-to-test-pypi.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ jobs:
99
build-n-publish:
1010
name: Build and publish Python 🐍 distributions 📦 to TestPyPI
1111
runs-on: ubuntu-latest
12+
permissions:
13+
id-token: write
1214
steps:
1315
- uses: actions/checkout@v4
1416
- name: Set up Python 3.10
@@ -34,7 +36,5 @@ jobs:
3436
- name: Publish distribution 📦 to Test PyPI
3537
uses: pypa/gh-action-pypi-publish@release/v1
3638
with:
37-
user: __token__
38-
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
3939
repository_url: https://test.pypi.org/legacy/
4040
skip_existing: true

djangocms_frontend/contrib/link/views.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ def get(self, request, *args, **kwargs):
2020
}
2121
"""
2222

23-
# TODO Check permissions
24-
# ======================
2523
self.term = kwargs.get("term", request.GET.get("term", "")).strip()
2624
results = get_link_choices(request, self.term)
2725
return JsonResponse(

0 commit comments

Comments
 (0)