Skip to content

Commit

Permalink
update all my organisation/projects auto publishing script up to 2024
Browse files Browse the repository at this point in the history
  • Loading branch information
chfw committed Nov 9, 2024
1 parent 0cbf781 commit 219dcfe
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions statics/pythonpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,16 @@ on:
types: [created]

jobs:
deploy:
pypi-publish:
name: upload release to PyPI
runs-on: ubuntu-latest
# Specifying a GitHub environment is optional, but strongly encouraged
environment: pypi
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
# retrieve your distributions here
- uses: actions/checkout@v1
- name: Set up Python
uses: actions/setup-python@v1
Expand All @@ -16,11 +23,9 @@ 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 }}
pip install setuptools wheel
- name: Build
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 219dcfe

Please sign in to comment.