Skip to content

Commit

Permalink
Add support for publishing tags to PyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
mkjpryor committed Nov 1, 2023
1 parent d6d49ef commit a17e7dc
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/pypi-publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Publish to PyPI
on:
push:
tags:
- "**"

jobs:
publish_to_pypi:
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/kube-custom-resource
permissions:
id-token: write
steps:
- name: Check out the repository
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"

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

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

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

0 comments on commit a17e7dc

Please sign in to comment.