Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
name: Publish Python 🐍 distribution 📦 to PyPI
name: Python package CI

on:
push:
branches: [main]
workflow_dispatch:
branches: [main, dev]
pull_request:
branches: [main, dev]

permissions:
id-token: write
contents: read

env:
PYTHON_VERSION: '3.x'

jobs:
build-and-publish:
build:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
Expand All @@ -25,6 +24,4 @@ jobs:
python-version: ${{ env.PYTHON_VERSION }}
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
password: ${{ secrets.PYPI_API_KEY }}
- run: python -m pip install dist/*.whl
27 changes: 27 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Python distribution to PyPI

on:
workflow_dispatch:

permissions:
contents: read

env:
PYTHON_VERSION: '3.x'

jobs:
publish:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with:
persist-credentials: false
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # release/v1
with:
password: ${{ secrets.PYPI_API_KEY }}
Loading