Skip to content

fix: Convert MkDocs relative asset paths to absolute for CSS loading #92

fix: Convert MkDocs relative asset paths to absolute for CSS loading

fix: Convert MkDocs relative asset paths to absolute for CSS loading #92

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
workflow_dispatch:
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write # Required for trusted publishing
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build package
run: python -m build
- name: Validate package
run: |
twine check dist/*
echo "✓ Package validation passed"
- name: Extract version from tag
id: version
run: |
VERSION=${GITHUB_REF#refs/tags/v}
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Releasing version: $VERSION"
- name: Generate release notes
id: changelog
run: |
if [ -f CHANGELOG.md ]; then
# Extract current version section from CHANGELOG.md
VERSION=${{ steps.version.outputs.version }}
awk "/## \[$VERSION\]/,/## \[/" CHANGELOG.md | head -n -1 > RELEASE_NOTES.md
# If extraction failed or is empty, use git log
if [ ! -s RELEASE_NOTES.md ]; then
echo "## What's Changed in v$VERSION" > RELEASE_NOTES.md
git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty=format:"- %s (%h)" >> RELEASE_NOTES.md
fi
else
echo "## What's Changed" > RELEASE_NOTES.md
git log $(git describe --tags --abbrev=0 HEAD^)..HEAD --pretty=format:"- %s (%h)" >> RELEASE_NOTES.md
fi
echo "" >> RELEASE_NOTES.md
echo "---" >> RELEASE_NOTES.md
echo "**Full Changelog**: https://github.com/${{ github.repository }}/compare/$(git describe --tags --abbrev=0 HEAD^)...v${{ steps.version.outputs.version }}" >> RELEASE_NOTES.md
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create v${{ steps.version.outputs.version }} \
dist/* \
--title "v${{ steps.version.outputs.version }}" \
--notes-file RELEASE_NOTES.md \
--verify-tag
# PyPI publishing is handled by publish-pypi.yml via OIDC trusted publishing
# which triggers when this release is created