Skip to content

Commit

Permalink
ci: stop using username and password for uploading to pip
Browse files Browse the repository at this point in the history
  • Loading branch information
LuisScoccola committed Sep 5, 2024
1 parent fa164ae commit 6b462ab
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

runs-on: "ubuntu-latest"
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -30,9 +33,6 @@ jobs:
- name: Run tests
run: pytest .
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist
twine upload --skip-existing dist/*
Expand All @@ -44,6 +44,8 @@ jobs:
python-version: ["3.8", "3.9", "3.10", "3.11"]

runs-on: "windows-latest"
permissions:
id-token: write

steps:
- uses: actions/checkout@v4
Expand All @@ -59,9 +61,6 @@ jobs:
- name: Run tests
run: pytest .
- name: Build and publish
env:
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py bdist_wheel
twine upload --skip-existing dist/*

0 comments on commit 6b462ab

Please sign in to comment.