Skip to content

feat(smith): implement connect/disconnect/update/status CLI commands … #2

feat(smith): implement connect/disconnect/update/status CLI commands …

feat(smith): implement connect/disconnect/update/status CLI commands … #2

Workflow file for this run

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: |
# Extract semver core (major.minor.patch) from pyproject.toml
VERSION=$(grep '^version' pyproject.toml | head -1 | sed 's/version = "\(.*\)"/\1/')
echo "version=${VERSION}" >> "$GITHUB_OUTPUT"
# Build metadata (+YYYYMMDD) is appended at tag time, not stored in pyproject.toml
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@c0c76fcf76c37099e6a452584d04b015240faefc # 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: |
DATE=$(date +%Y%m%d)
TAG="v${{ steps.version.outputs.version }}+${DATE}"
git tag "$TAG"
git push origin "$TAG"
echo "Created tag $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."