Skip to content

Commit

Permalink
Add automatic upload to PyPI of releases
Browse files Browse the repository at this point in the history
This should mean creating a GitHub release will cause this new workflow
to run to use PyPI's trusted publishers.
  • Loading branch information
aragilar committed Jul 11, 2024
1 parent 1474965 commit ba27539
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
release:
types:
- published

name: release

jobs:
pypi:
name: upload release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: "3.12"

- name: Install deps
run: python -m pip install -U build

- name: Setup dist
run: mkdir dist

- name: Build sdist
run: for f in packages/*; do python -m build --sdist $f; done

- name: Collect dists
run: cp packages/*/dist/* dist/

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

0 comments on commit ba27539

Please sign in to comment.