Release v0.4.0 #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| workflow_dispatch: | |
| release: | |
| types: | |
| - created | |
| # Sequence of patterns matched against refs/tags | |
| tags: | |
| - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
| env: | |
| UV_SYSTEM_PYTHON: "1" | |
| jobs: | |
| release: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: release | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| version: 0.8.12 | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install $PYTHON_VERSION && uv python pin $PYTHON_VERSION | |
| env: | |
| PYTHON_VERSION: 3.11.9 | |
| - name: Generate Version | |
| run: export VERSION=$(uv run dunamai from any --style pep440) && echo "Version is $VERSION" && echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| - name: Replace version in code | |
| run: uv run hatch version $VERSION | |
| - name: Publish to PyPI | |
| run: uv build && uv publish | |
| - name: Fetch gh-pages branch | |
| run: git fetch origin gh-pages:gh-pages || true | |
| - name: Publish Docs | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "[email protected]" | |
| uv run --group docs --all-extras mike deploy --push --update-aliases $VERSION latest | |