Update version #231
Workflow file for this run
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: Build and upload to PyPI | |
env: | |
CIBW_SKIP: cp27-* pp27-* | |
CIBW_BEFORE_BUILD: python -m pip install setuptools_scm | |
# Publish when a (published) GitHub Release is created: | |
on: push | |
jobs: | |
build_and_publish: | |
name: Build source distribution | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get source code | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
name: Install Python | |
with: | |
python-version: '3.9' | |
- name: Install build requirements | |
run: python -m pip install build wheel setuptools setuptools_scm | |
- name: Create distribution | |
run: python -m build --sdist --wheel --outdir dist/ . | |
- name: Publish to PyPI | |
if: startsWith(github.ref, 'refs/tags') | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI_API_TOKEN }} |