Skip to content

Publish to PyPI

Publish to PyPI #86

Workflow file for this run

name: Publish to PyPI
on:
workflow_dispatch:
inputs:
version:
type: choice
description: Version to bump
options:
- patch
- minor
- major
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.NANOME_BOT_PAT }}
- name: Install Python 3
uses: actions/setup-python@v1
- name: Install Dependencies
run: |
python -m pip install bump2version setuptools wheel twine
- name: Bump Version
run: |
git config --global user.name 'nanome-bot'
git config --global user.email '45469149+nanome-bot@users.noreply.github.com'
bump2version ${{ github.event.inputs.version }}
git push --follow-tags
- name: Build and Publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
(cd plugin-template && zip -9r ../nanome/plugin-template.zip .)
python setup.py sdist
python setup.py bdist_wheel --universal
twine upload dist/*