Skip to content

Commit

Permalink
ci: Switch to trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
marksweb committed Mar 18, 2024
1 parent 9ad8d34 commit 62f3973
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
schedule:
interval: "weekly"
10 changes: 6 additions & 4 deletions .github/workflows/publish-to-live-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to pypi
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/djangocms-text
permissions:
id-token: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.12
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down Expand Up @@ -41,6 +46,3 @@ jobs:
- name: Publish distribution πŸ“¦ to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
9 changes: 6 additions & 3 deletions .github/workflows/publish-to-test-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,15 @@ jobs:
build-n-publish:
name: Build and publish Python 🐍 distributions πŸ“¦ to TestPyPI
runs-on: ubuntu-latest
environment:
name: test
url: https://test.pypi.org/p/djangocms-text
permissions:
id-token: write
steps:
- uses: actions/checkout@master
- name: Set up Python 3.12
uses: actions/setup-python@v1
uses: actions/setup-python@v5
with:
python-version: 3.12

Expand Down Expand Up @@ -42,7 +47,5 @@ jobs:
- name: Publish distribution πŸ“¦ 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

0 comments on commit 62f3973

Please sign in to comment.