Skip to content

Updating version and changelog #88

Updating version and changelog

Updating version and changelog #88

Workflow file for this run

## Build wheel and upload to PyPI
## https://github.com/joerick/cibuildwheel/blob/master/examples/github-deploy.yml
## https://scikit-hep.org/developer/gha_wheels
name: Build wheel and upload to PyPI
# Publish when a (published) GitHub Release is created
on:
push:
branches:
- main
tags:
- "v*"
release:
jobs:
build_wheels:
name: Build universal wheels
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip wheel setuptools
- name: Build wheels
run: |
python3 setup.py bdist_wheel --universal
- uses: actions/upload-artifact@v3
with:
path: dist
build_sdist:
name: Build source
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip setuptools
- name: Build sdist
run: python3 setup.py sdist
- uses: actions/upload-artifact@v3
with:
path: dist/*.tar.gz
dist_check:
name: Check build with twine
runs-on: ubuntu-latest
needs: [build_wheels, build_sdist]
steps:
- uses: actions/setup-python@v4
name: Install Python
with:
python-version: '3.10'
- name: Install Python dependencies
run: |
python3 -m pip install --upgrade pip
pip install twine
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- name: Check dist
run: |
twine check dist/*
upload_pypi:
# upload to PyPI on every tag starting with 'v'
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v')
name: Upload to PyPI
needs: [dist_check]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: artifact
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.pypi_password }}
# End