Skip to content

Commit

Permalink
ci(pypi): change pypi upload to use trusted publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBin99 committed Dec 1, 2023
1 parent 265b008 commit 302f625
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions .github/workflows/pypi_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ on:
jobs:
deploy:
runs-on: "ubuntu-latest"
environment:
name: "pypi"
url: "https://pypi.org/project/django-vite/"
permissions:
id-token: "write"
steps:
- uses: "actions/checkout@v3"
- name: "Setup Python"
Expand All @@ -16,11 +21,8 @@ jobs:
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: "Build and publish"
env:
TWINE_USERNAME: "${{ secrets.PYPI_USERNAME }}"
TWINE_PASSWORD: "${{ secrets.PYPI_PASSWORD }}"
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
pip install setuptools wheel
- name: "Build"
run: "python setup.py sdist bdist_wheel"
- name: "Publish"
uses: "pypa/gh-action-pypi-publish@release/v1"

0 comments on commit 302f625

Please sign in to comment.