mirror of
https://github.com/invariantlabs-ai/invariant-gateway.git
synced 2026-07-05 10:27:50 +02:00
Add PyPi publish action.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
name: Publish to PyPI
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
pypi-publish:
|
||||
name: Upload release to PyPI
|
||||
runs-on: ubuntu-latest
|
||||
environment: pypi-package
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python 3.12.2
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.12.2"
|
||||
|
||||
- name: Install build tools
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install build twine
|
||||
|
||||
- name: Build package
|
||||
run: |
|
||||
python -m build
|
||||
|
||||
# TODO: Run tests against the built wheel
|
||||
|
||||
- name: Publish to PyPI
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
|
||||
run: |
|
||||
python -m twine upload dist/*
|
||||
Reference in New Issue
Block a user