Skip to content

Commit

Permalink
Publish to PyPI via pypa/gh-action-pypi-publish
Browse files Browse the repository at this point in the history
Build wheel and sdist artifacts and publish to PyPI when a new release
is published via GitHub.

Resolves #80.
  • Loading branch information
jonafato committed May 8, 2023
1 parent 9d7c5dd commit ffa4d0f
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

permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write

jobs:
pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/vladiate
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ">= 3.7"

- name: Install pypa/build
run: python -m pip install build --user

- name: Build a binary wheel and a source tarball
run: python -m build --sdist --wheel --outdir dist/

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

0 comments on commit ffa4d0f

Please sign in to comment.