Skip to content

feat(ci): update ci wf #1

feat(ci): update ci wf

feat(ci): update ci wf #1

Workflow file for this run

name: Deploy to PyPi
on:
push:
branches:
- main
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine wheel scmver setuptools
- name: Get version from setup.py
id: version
run: |
version=$(python3 setup.py --version)
echo "version=$version" >> $GITHUB_ENV
- name: Build package
run: python setup.py sdist bdist_wheel
- name: Publish package
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Create and push tag
run: |
git tag v$version
git push origin v$version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}