Skip to content

Publishing on PyPI

Publishing on PyPI #20

Workflow file for this run

name: Publishing on PyPi
on:
release:
types: [published]
jobs:
publish:
name: Publish Python 🐍 distributions 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Check Version
run: test ${{ github.event.release.tag_name }} = `python -c "import scorep._version; print('v'+scorep._version.__version__)"`
- name: Add Score-P repo
run: sudo add-apt-repository ppa:score-p/releases
- name: Install Score-P
run: sudo apt-get -y install scorep
- name: Setup environment
run: echo "$HOME/scorep/bin" >> $GITHUB_PATH
- name: Install pypa/build
run: >-
python -m
pip install build --user
- name: Build a source tarball
run: >-
python -m
build --sdist --outdir dist/ .
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}