Skip to content

Commit

Permalink
Update PyPI GitHub Actions workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hackebrot committed Mar 22, 2023
1 parent 5ff3469 commit 28492af
Showing 1 changed file with 23 additions and 18 deletions.
41 changes: 23 additions & 18 deletions .github/workflows/upload-to-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,30 @@ on:
release:
types: [published]

permissions:
contents: read

jobs:
upload:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Package project
run: |
python setup.py sdist bdist_wheel
- name: Upload distributions
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel twine
- name: Package project
run: |
python setup.py sdist bdist_wheel
- name: Upload distributions
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
twine upload dist/*

0 comments on commit 28492af

Please sign in to comment.