Skip to content

Use python 3.11 in test #26

Use python 3.11 in test

Use python 3.11 in test #26

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*' # This triggers the action for tags starting with "v" (e.g., v0.1.0)
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' # You can specify a more specific version like '3.8' if needed
# 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/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PIPY_API_TOKEN }}