update scheming #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Package to PyPI | |
on: | |
push: | |
branches: | |
- main # Set to a default branch | |
tags: | |
- 'v*' # A semantic versioning tag | |
jobs: | |
build-and-upload: | |
runs-on: [macos-latest] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 # This ensures all history and tags are fetched | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools wheel twine | |
- name: Build and publish to PyPI | |
env: | |
PYPI_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
PYPI_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
python -c "import setuptools_scm; print(setuptools_scm.get_version())" | |
python -m twine upload dist/* --username $PYPI_USERNAME --password $PYPI_PASSWORD |