Skip to content

update to collection2 (#24) #36

update to collection2 (#24)

update to collection2 (#24) #36

Workflow file for this run

name: CD
on:
push:
branches:
- main
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Evaluate version bump
run: |
case "${{ github.event.head_commit.message }}" in
PATCH*)
part=patch;;
MAJOR*)
part=major;;
*)
part=minor;;
esac
echo "part=$(echo $part)" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build bump2version==1.0.1
- name: bump version
run: |
git config --global user.name 'version bump'
git config --global user.email '[email protected]'
bump2version \
--commit \
--tag \
${{ env.part }}
git push --atomic origin main v$(cat .bumpversion.cfg | grep -Po "current_version = \K\d+\.\d+\.\d+")
- name: Build package
run: python -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}