feat: add flowr console script entry point (v1.2.1 Sifted Spelt) #19
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: Tag Release | |
| on: | |
| push: | |
| branches: [main] | |
| paths: [pyproject.toml] | |
| permissions: | |
| contents: write | |
| jobs: | |
| tag: | |
| name: Create version tag | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| env: | |
| UV_SYSTEM_PYTHON: "false" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4.1.1 | |
| - name: Extract version from pyproject.toml | |
| id: version | |
| run: | | |
| VERSION=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/') | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| echo "tag=v${VERSION}" >> "$GITHUB_OUTPUT" | |
| - name: Check if tag already exists | |
| id: check | |
| run: | | |
| if git ls-remote --tags origin "refs/tags/v${{ steps.version.outputs.version }}" | grep -q .; then | |
| echo "exists=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "exists=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Install uv | |
| if: steps.check.outputs.exists == 'false' | |
| uses: astral-sh/setup-uv@05143d3dcd540a42aa638bb0920ac4e3123808a5 # v4.0.0 | |
| with: | |
| enable-cache: true | |
| cache-dependency-glob: "uv.lock" | |
| - name: Set up Python 3.13 | |
| if: steps.check.outputs.exists == 'false' | |
| run: uv python install 3.13 | |
| - name: Install dependencies | |
| if: steps.check.outputs.exists == 'false' | |
| run: uv sync --locked --all-extras --dev && uv pip install -e . | |
| - name: Run release-check | |
| if: steps.check.outputs.exists == 'false' | |
| run: uv run task release-check | |
| - name: Create and push tag | |
| if: steps.check.outputs.exists == 'false' | |
| env: | |
| GIT_AUTHOR_NAME: github-actions[bot] | |
| GIT_AUTHOR_EMAIL: github-actions[bot]@users.noreply.github.com | |
| GIT_COMMITTER_NAME: github-actions[bot] | |
| GIT_COMMITTER_EMAIL: github-actions[bot]@users.noreply.github.com | |
| run: | | |
| git tag "${{ steps.version.outputs.tag }}" | |
| git push origin "${{ steps.version.outputs.tag }}" | |
| echo "Created tag ${{ steps.version.outputs.tag }} at $(git rev-parse HEAD)" | |
| - name: Skip (tag already exists) | |
| if: steps.check.outputs.exists == 'true' | |
| run: echo "Tag ${{ steps.version.outputs.tag }} already exists — skipping." |