chore(pyproject.toml): update pb-spec version to 0.8.8 and dependencies #36
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 | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Get version from tag | |
| id: tag_version | |
| run: echo "VERSION=${GITHUB_REF#refs/tags/v}" >> $GITHUB_ENV | |
| - name: Check pyproject.toml version | |
| run: | | |
| # Get the version from pyproject.toml using python's built-in tomllib (3.11+) | |
| FILE_VERSION=$(python -c "import tomllib; print(tomllib.load(open('pyproject.toml', 'rb'))['project']['version'])") | |
| echo "pyproject.toml version: $FILE_VERSION" | |
| echo "Tag version: ${{ env.VERSION }}" | |
| if [ "$FILE_VERSION" != "${{ env.VERSION }}" ]; then | |
| echo "Error: pyproject.toml version ($FILE_VERSION) does not match tag version (${{ env.VERSION }})" | |
| exit 1 | |
| fi | |
| - name: Generate Changelog | |
| uses: orhun/git-cliff-action@v4 | |
| id: git-cliff | |
| with: | |
| config: cliff.toml | |
| args: --verbose --latest --strip header | |
| env: | |
| OUTPUT: CHANGELOG.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body: ${{ steps.git-cliff.outputs.content }} | |
| prerelease: ${{ contains(github.ref, 'alpha') || contains(github.ref, 'beta') }} | |
| - name: Build Package | |
| run: uv build | |
| - name: Publish to PyPI | |
| env: | |
| UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }} | |
| run: uv publish |