Skip to content

Commit

Permalink
testing permissions on workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulRaven committed Jun 10, 2024
1 parent 75bc20c commit 33de454
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ on:
release:
types: [ published ]
branches: [ main ]
permissions:
id-token: write
contents: write
jobs:
quality:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -126,3 +129,26 @@ jobs:
gh release upload
'${{ github.ref_name }}' dist/**
--repo '${{ github.repository }}'
publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: testpypi
url: https://test.pypi.org/p/${{github.repo_name}}

permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing

steps:
- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish distribution 📦 to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/

0 comments on commit 33de454

Please sign in to comment.