Skip to content

publish job

publish job #40

Workflow file for this run

name: Publish Python distributions to PyPI
on:
push:
tags:
- '*'
jobs:
build-n-publish:
name: Build and publish Python distributions to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Setup and build
run: |
python -m pip install build wheel
version=$(echo $GITHUB_REF | cut -d / -f 3)
sed -i "s/__version__ = .*/__version__ = \"$version\"/g" mmuxer/__init__.py
python -m build --sdist --wheel
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}