Skip to content

Upload Python Package #23

Upload Python Package

Upload Python Package #23

name: Upload Python Package
on:
push:
branches:
- master
paths:
- '/emanifest-py/pyproject.toml'
workflow_dispatch:
defaults:
run:
working-directory: emanifest-py
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Check out Repo
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
cache: 'pip'
python-version: '3.x'
- name: Install dependencies
run : |
pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
# use twine's "-r testpypi" flag to upload to http://test.pypi.org
run: |
pip install --upgrade twine
twine upload --skip-existing dist/*