Skip to content

Prepare v0.1.3 release #3

Prepare v0.1.3 release

Prepare v0.1.3 release #3

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*'
permissions:
deployments: write
packages: write
repository-projects: read
contents: read
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checkout the code
- name: Checkout code
uses: actions/checkout@v4
# Set up Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
# Install dependencies
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
# Build the distribution
- name: Build distribution
run: |
CURRENT_TAG=$(git describe --tags --abbrev=0)
VERSION=${CURRENT_TAG#v} # Remove 'v' from the tag
sed -i "s/version=\"[^\"]*\"/version=\"$VERSION\"/" setup.py
python setup.py sdist bdist_wheel
# Upload the distribution to PyPI
- name: Upload to PyPI
run: |
twine upload dist/*