From 439c3e1b2cadc9f7a95530c7f33afecb1efb996e Mon Sep 17 00:00:00 2001 From: Yoni Melki Date: Wed, 15 Jul 2026 13:47:09 +0300 Subject: [PATCH 1/2] feat(AX-1837): add VERSION file, release workflow, and drift-prevention check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Seed VERSION at 0.1.1 (current .devin-plugin/plugin.json version) - release.yml: on push to main with [major/minor/patch], reads VERSION, creates vX.Y.Z git tag, publishes GitHub Release with repo zip - validate-version.yml: PR check — fails if VERSION != plugin.json version - CONTRIBUTING.md: add Releasing section documenting the new flow Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 55 ++++++++++++++++++++++++++ .github/workflows/validate-version.yml | 25 ++++++++++++ CONTRIBUTING.md | 9 +++++ VERSION | 1 + 4 files changed, 90 insertions(+) create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/validate-version.yml create mode 100644 VERSION diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..468c804 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,55 @@ +name: Release + +on: + push: + branches: [main] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: false + +permissions: + contents: write + +jobs: + release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Detect release tag in commit message + id: detect + run: | + MSG="${{ github.event.head_commit.message }}" + if echo "$MSG" | grep -qE '\[(major|minor|patch)\]'; then + echo "triggered=true" >> "$GITHUB_OUTPUT" + else + echo "triggered=false" >> "$GITHUB_OUTPUT" + fi + + - name: Read version + if: steps.detect.outputs.triggered == 'true' + id: version + run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + + - name: Create and push tag + if: steps.detect.outputs.triggered == 'true' + run: | + git tag "v${{ steps.version.outputs.version }}" + git push origin "v${{ steps.version.outputs.version }}" + + - name: Package release artifact + if: steps.detect.outputs.triggered == 'true' + run: zip -r release.zip . --exclude ".git/*" --exclude ".github/*" + + - name: Create GitHub Release + if: steps.detect.outputs.triggered == 'true' + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "v${{ steps.version.outputs.version }}" \ + release.zip \ + --title "Release v${{ steps.version.outputs.version }}" \ + --generate-notes diff --git a/.github/workflows/validate-version.yml b/.github/workflows/validate-version.yml new file mode 100644 index 0000000..5f32229 --- /dev/null +++ b/.github/workflows/validate-version.yml @@ -0,0 +1,25 @@ +name: Validate version + +on: + pull_request: + branches: [main] + +jobs: + validate: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Check version consistency + run: | + VERSION=$(cat VERSION) + FAILED=0 + + PLUGIN_VERSION=$(jq -r '.version' .devin-plugin/plugin.json) + if [ "$VERSION" != "$PLUGIN_VERSION" ]; then + echo "::error::Version mismatch: VERSION=$VERSION but .devin-plugin/plugin.json.version=$PLUGIN_VERSION" + FAILED=1 + fi + + [ "$FAILED" -eq 0 ] && echo "All versions consistent: $VERSION" + exit $FAILED diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index a8b9648..2f8ab67 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -48,6 +48,15 @@ This downloads the pinned upstream tarball and replaces the contents of `skills/ - [ ] If the skill tree changed: `pin` in `.github/scripts/sync-skills-vendor.json` matches the upstream tag the new tree was generated from. - [ ] Smoke-test: `devin plugins install . -y` and `devin plugins info jfrog` from the repo root. +## Releasing + +To cut a release: + +1. In your PR, bump `VERSION` and sync `.devin-plugin/plugin.json` `.version` to match. The `validate-version` PR check enforces this. +2. Merge to `main` with `[major]`, `[minor]`, or `[patch]` anywhere in the commit message. + +The release workflow reads `VERSION`, creates a `vX.Y.Z` git tag, and publishes a GitHub Release with a repo zip attached. No bot push to `main` — the version bump is part of the PR itself. + ## Build order Releases follow a fixed sequence: diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..17e51c3 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.1.1 From 46babf7b55d16b0697e1dbe27f05d6b9900d21d6 Mon Sep 17 00:00:00 2001 From: Yoni Melki Date: Thu, 16 Jul 2026 12:49:07 +0300 Subject: [PATCH 2/2] AX-1837 - Apply PR review feedback: copyright headers, checkout@v5, step comments Co-Authored-By: Claude Sonnet 4.6 --- .github/workflows/release.yml | 9 ++++++++- .github/workflows/validate-version.yml | 3 ++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 468c804..c455135 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,3 +1,4 @@ +# Copyright (c) JFrog Ltd. 2026 name: Release on: @@ -15,10 +16,12 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + # Check out the repository with a token to allow pushing tags + - uses: actions/checkout@v5 with: token: ${{ secrets.GITHUB_TOKEN }} + # Parse the commit message to check if a release tag keyword is present - name: Detect release tag in commit message id: detect run: | @@ -29,21 +32,25 @@ jobs: echo "triggered=false" >> "$GITHUB_OUTPUT" fi + # Read the current version from the VERSION file - name: Read version if: steps.detect.outputs.triggered == 'true' id: version run: echo "version=$(cat VERSION)" >> "$GITHUB_OUTPUT" + # Create a git tag for the release version and push it to origin - name: Create and push tag if: steps.detect.outputs.triggered == 'true' run: | git tag "v${{ steps.version.outputs.version }}" git push origin "v${{ steps.version.outputs.version }}" + # Package the repository contents into a zip archive for the release - name: Package release artifact if: steps.detect.outputs.triggered == 'true' run: zip -r release.zip . --exclude ".git/*" --exclude ".github/*" + # Create a GitHub Release with the packaged artifact and auto-generated release notes - name: Create GitHub Release if: steps.detect.outputs.triggered == 'true' env: diff --git a/.github/workflows/validate-version.yml b/.github/workflows/validate-version.yml index 5f32229..f16e4af 100644 --- a/.github/workflows/validate-version.yml +++ b/.github/workflows/validate-version.yml @@ -1,3 +1,4 @@ +# Copyright (c) JFrog Ltd. 2026 name: Validate version on: @@ -8,7 +9,7 @@ jobs: validate: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Check version consistency run: |