chore: bump version to 0.1.1 #5
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: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| discussions: write | |
| id-token: write | |
| jobs: | |
| release: | |
| name: Create Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@v5 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| - name: Set up Python | |
| run: uv python install | |
| - name: Install dependencies | |
| run: uv sync --all-extras --dev | |
| - name: Run checks | |
| run: | | |
| uv run ruff check . | |
| uv run ruff format --check . | |
| uv run ty check | |
| - name: Run tests | |
| run: uv run pytest | |
| - name: Extract version from tag | |
| id: version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT | |
| - name: Verify version matches | |
| run: | | |
| FILE_VERSION=$(grep -oP '__version__ = "\K[^"]+' packages/common/src/handler_common/_version.py) | |
| TAG_VERSION=${{ steps.version.outputs.VERSION }} | |
| if [ "$FILE_VERSION" != "$TAG_VERSION" ]; then | |
| echo "Error: Version mismatch! File: $FILE_VERSION, Tag: $TAG_VERSION" | |
| exit 1 | |
| fi | |
| - name: Build packages | |
| run: uv build | |
| - name: Upload build artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| generate_release_notes: true | |
| discussion_category_name: Announcements | |
| files: dist/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| publish: | |
| name: Publish to PyPI | |
| runs-on: ubuntu-latest | |
| needs: release | |
| environment: | |
| name: pypi | |
| steps: | |
| - name: Download build artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - name: Publish to PyPI | |
| run: uv publish |