Skip to content

[feat] add running cat animation (#6) #7

[feat] add running cat animation (#6)

[feat] add running cat animation (#6) #7

Workflow file for this run

name: Update Version and Publish
on:
push:
tags:
- 'v*'
permissions:
contents: write
packages: write
jobs:
build-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Extract version from tag
id: get_version
run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV
- name: Update version in pyproject.toml and __init__.py
run: |
sed -i "s/version = \"[0-9]*\.[0-9]*\.[0-9]*\"/version = \"$VERSION\"/" pyproject.toml
sed -i "s/__version__ = \"[0-9]*\.[0-9]*\.[0-9]*\"/__version__ = \"$VERSION\"/" src/lazy_b/__init__.py
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and check package
run: |
python -m build
twine check dist/*
- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
body: |
Release version ${{ env.VERSION }}
### Changes in this release:
- See commit history for details
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}