Skip to content

Commit

Permalink
Update publish_to_pypi.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
grantbuster authored Nov 29, 2023
1 parent e39b1c4 commit 36442df
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,24 @@ name: Upload to PyPi
on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
python-version: 3.9
- name: Install dependencies and Build
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/*
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 36442df

Please sign in to comment.