From 178aa951b3a831253e134b18c7093317a6b7dfb5 Mon Sep 17 00:00:00 2001 From: Nate Olsen Date: Sun, 6 Sep 2026 10:08:40 -0700 Subject: [PATCH 1/3] Check out the branch (not the detached merge ref) in Code Checker On pull_request events actions/checkout lands on refs/pull/N/merge, a detached HEAD, so stefanzweifel/git-auto-commit-action warns and has to guess the branch from GITHUB_HEAD_REF before it can push the ruff fixes. Pin `ref` to github.head_ref (pull_request) or github.ref_name (push) so the checkout is on a real branch. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/codechecker.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/codechecker.yml b/.github/workflows/codechecker.yml index 3d96e74..5f3fa95 100644 --- a/.github/workflows/codechecker.yml +++ b/.github/workflows/codechecker.yml @@ -16,7 +16,10 @@ jobs: - uses: actions/checkout@v6 with: # Required so the bot can push changes back - fetch-depth: 0 + fetch-depth: 0 + # Check out the real branch (not the detached pull_request merge ref) + # so git-auto-commit can commit the ruff fixes onto it. + ref: ${{ github.head_ref || github.ref_name }} - uses: actions/setup-python@v6 with: From e479d9e432e04de389be587da7f0d95cb70fd93a Mon Sep 17 00:00:00 2001 From: Nate Olsen Date: Sun, 6 Sep 2026 10:17:42 -0700 Subject: [PATCH 2/3] Set manifest version to 0.10.0 (was a stale 3.0.0) main is on the 0.9.x release line; this branch still carried 3.0.0 from before the first releases existed. Merging that would push main's manifest above the release line and leave HACS unable to offer any 0.x release as an update. Align it with the next planned tag. Co-Authored-By: Claude Sonnet 5 --- custom_components/pfsense/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/custom_components/pfsense/manifest.json b/custom_components/pfsense/manifest.json index 41ea716..0898b1e 100644 --- a/custom_components/pfsense/manifest.json +++ b/custom_components/pfsense/manifest.json @@ -12,5 +12,5 @@ "requirements": [ "mac-vendor-lookup>=0.1.11" ], - "version": "3.0.0" + "version": "0.10.0" } From 9cb0d4dd20f4ddbb6973889cbcb1ab264a4ea908 Mon Sep 17 00:00:00 2001 From: Nate Olsen Date: Sun, 6 Sep 2026 10:21:46 -0700 Subject: [PATCH 3/3] Prepare v0.9.3 and fix the tag/manifest version lag release.yml used to rewrite manifest.json from the tag name *after* the release was published, so every tag shipped the previous version's manifest (v0.9.1 installs report 0.9.0). Instead: - manifest.json is bumped in-repo (here, to 0.9.3) so the tagged commit already carries the right version. - release.yml no longer edits or commits the manifest. It now just verifies the tag matches manifest.json (failing the release if not), builds the zip, and uploads it. Supersedes the interim 0.10.0 bump on this branch. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/release.yml | 29 ++++++++----------------- custom_components/pfsense/manifest.json | 2 +- 2 files changed, 10 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1016fb2..d723c68 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,8 +15,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v6 - with: - fetch-depth: 0 - name: Detect integration id: integration @@ -27,30 +25,21 @@ jobs: echo "Detected integration: $INTEGRATION" - - name: Update manifest version + - name: Verify manifest version matches the tag run: | - VERSION=${GITHUB_REF_NAME#v} INTEGRATION=${{ steps.integration.outputs.integration }} - - sudo apt-get update - sudo apt-get install -y jq - MANIFEST="custom_components/$INTEGRATION/manifest.json" - tmp=$(mktemp) + TAG_VERSION=${GITHUB_REF_NAME#v} + MANIFEST_VERSION=$(jq -r '.version' "$MANIFEST") - jq --arg version "$VERSION" \ - '.version = $version' \ - "$MANIFEST" > "$tmp" + echo "tag: $GITHUB_REF_NAME -> $TAG_VERSION" + echo "manifest: $MANIFEST_VERSION" - mv "$tmp" "$MANIFEST" - - - name: Commit and push changes - uses: stefanzweifel/git-auto-commit-action@v7 - with: - commit_message: "Bump manifest version to ${{ github.ref_name }} [skip ci]" - file_pattern: "custom_components/**/manifest.json" - branch: main + if [ "$TAG_VERSION" != "$MANIFEST_VERSION" ]; then + echo "::error::Release tag $GITHUB_REF_NAME does not match $MANIFEST version $MANIFEST_VERSION. Bump manifest.json in a commit and tag that commit." + exit 1 + fi - name: Create ZIP run: | diff --git a/custom_components/pfsense/manifest.json b/custom_components/pfsense/manifest.json index 0898b1e..1dc6868 100644 --- a/custom_components/pfsense/manifest.json +++ b/custom_components/pfsense/manifest.json @@ -12,5 +12,5 @@ "requirements": [ "mac-vendor-lookup>=0.1.11" ], - "version": "0.10.0" + "version": "0.9.3" }