Skip to content

Commit

Permalink
Update publish_pypi.yml
Browse files Browse the repository at this point in the history
going for a better pypipyyypoiypy
  • Loading branch information
kuffmode authored Mar 19, 2024
1 parent 610afed commit 19db365
Showing 1 changed file with 23 additions and 20 deletions.
43 changes: 23 additions & 20 deletions .github/workflows/publish_pypi.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,29 @@
name: Upload Python Package
'on':

on:
push:
branches: main
permissions:
contents: read

jobs:
deploy:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: release
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: '${{ secrets.PYPI_API_TOKEN }}'
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 19db365

Please sign in to comment.