Skip to content

Commit

Permalink
ci:remove pypi to use Trusted Publisher
Browse files Browse the repository at this point in the history
  • Loading branch information
cunla committed Apr 20, 2024
1 parent 1e52036 commit 05f9a41
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,13 @@ on:
types: [published]

jobs:
deploy:
publish:
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
environment:
name: pypi
url: https://pypi.org/p/fakeredis
steps:
- uses: actions/checkout@v4
- name: Set up Python
Expand All @@ -23,13 +28,13 @@ jobs:
pip install build
- name: Build package
run: python -m build
- name: Publish package

- name: Publish package to pypi
uses: pypa/gh-action-pypi-publish@v1.8.14
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
print_hash: true
- name: Deploy documentation

- name: Publish documentation
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
Expand Down

0 comments on commit 05f9a41

Please sign in to comment.