Skip to content

update readme

update readme #1

Workflow file for this run

name: Publish to PyPI
on:
push:
tags:
- 'v*' # Trigger on version tags like v1.0.0, v1.2.3, etc.
jobs:
publish-prod:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Extract version from tag
id: extract_version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Extracted version: $VERSION"
- name: Update version in pyproject.toml
run: |
sed -i 's/version = "[^"]*"/version = "${{ steps.extract_version.outputs.version }}"/' pyproject.toml
echo "Updated pyproject.toml version to ${{ steps.extract_version.outputs.version }}"
- name: Build package
run: python -m build
- name: Check package
run: python -m twine check dist/*
- name: Publish to PyPI
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
run: |
python -m twine upload dist/*
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ steps.extract_version.outputs.version }}
body: |
## Changes in this Release
Please see the [CHANGELOG.md](CHANGELOG.md) for detailed changes.
## Installation
```bash
pip install xaiflow==${{ steps.extract_version.outputs.version }}
```
draft: false
prerelease: false