Skip to content

Bump version number #27

Bump version number

Bump version number #27

Workflow file for this run

name: Deploy to PyPI
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
deploy:
name: Publish 🐍 📦 to PyPI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: release
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Set env variables
run: |
chmod +x .github/workflows/utils.sh
source .github/workflows/utils.sh
echo "TAG=$(get_most_recent_tag)" >> $GITHUB_ENV
echo "VERSION=$(hatch version)" >> $GITHUB_ENV
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .[build]
echo ${{ github.event.ref }}
echo "Tag/version mismatch: $TAG_MISMATCH"
- name: Build and publish to PyPI 📦
run: |
export HATCH_INDEX_USER="__token__"
export HATCH_INDEX_AUTH="${{ secrets.HATCH_INDEX_AUTH }}"
hatch build
hatch publish
# - name: Build distribution 📦
# run: python setup.py sdist bdist_wheel
# - name: Publish distribution 📦 to PyPI
# if: startsWith(github.event.ref, 'refs/tags')
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# user: __token__
# password: ${{ secrets.PYPI_TOKEN }}
# skip-existing: true