From d46804e8739b9788a9fd72db3403a0ad8d92973e Mon Sep 17 00:00:00 2001 From: "Gabor M." Date: Tue, 10 Feb 2026 01:59:27 +0100 Subject: [PATCH] Update release mechanism. --- .github/workflows/release.yml | 20 ++++++++++++-------- .reporails/backbone.yml | 3 +++ README.md | 2 +- VERSION | 1 + 4 files changed, 17 insertions(+), 9 deletions(-) create mode 100644 VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f215058..6a33618 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,26 +6,30 @@ on: jobs: check-release: - name: Check if release commit + name: Check if release needed runs-on: ubuntu-latest outputs: is_release: ${{ steps.check.outputs.is_release }} version: ${{ steps.check.outputs.version }} steps: - uses: actions/checkout@v4 + with: + fetch-depth: 0 - - name: Detect version branch merge + - name: Compare VERSION against existing tags id: check run: | - VERSION=$(grep '^\*\*Version:\*\*' README.md | head -1 | sed 's/.*\*\* *//') - MERGE_BRANCH=$(git log -1 --pretty=%s | grep -oP 'Merge.*from.*\K[0-9]+\.[0-9]+\.[0-9]+' || true) - if [ "$MERGE_BRANCH" = "$VERSION" ]; then + VERSION=$(cat VERSION) + if [ -z "$VERSION" ]; then + echo "is_release=false" >> "$GITHUB_OUTPUT" + echo "VERSION file is empty" + elif git rev-parse "$VERSION" >/dev/null 2>&1; then + echo "is_release=false" >> "$GITHUB_OUTPUT" + echo "Tag $VERSION already exists — not a release" + else echo "is_release=true" >> "$GITHUB_OUTPUT" echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Release detected: $VERSION" - else - echo "is_release=false" >> "$GITHUB_OUTPUT" - echo "Not a release merge (merge_branch=$MERGE_BRANCH, version=$VERSION)" fi qa: diff --git a/.reporails/backbone.yml b/.reporails/backbone.yml index 1782585..04b65d3 100644 --- a/.reporails/backbone.yml +++ b/.reporails/backbone.yml @@ -45,6 +45,9 @@ registry: coordinate_map: registry/coordinate-map.yml tombstones: registry/tombstones.yml +meta: + version_file: VERSION + docs: sources: docs/sources.yml rule_template: docs/rule-template.md diff --git a/README.md b/README.md index c7dc771..0483430 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Validation rules for AI agent instruction files (CLAUDE.md, .cursorrules, copilot-instructions.md). Community-maintained. -**Version:** 0.2.2 +**Version:** 0.3.1 ### Pre-1.0 — moving fast, API still evolving, feedback welcome. diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..a2268e2 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.3.1 \ No newline at end of file