Skip to content

Commit

Permalink
Automate PyPI uploads using Trusted Publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
dgw committed Jun 20, 2024
1 parent 814b8d2 commit 68d1cdd
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/trusted-publishing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Upload Python Package

on:
release:
types: [published]

permissions:
contents: read

jobs:
upload:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@81e9d935c883d0b210363ab89cf05f3894778450

0 comments on commit 68d1cdd

Please sign in to comment.