Skip to content

Commit dfc3e83

Browse files
authored
ci: wire wfctl plugin verify-capabilities + bump wfctl pin to v0.63.1 (workflow#765) (#20)
Layer 3b extension from workflow#765 sweep. Adds post-goreleaser `wfctl plugin verify-capabilities` step to release.yml; bumps Install wfctl pin v0.62.0 → v0.63.1 (carries the new subcommand). jq filter selects this plugin's linux/<runner-arch> binary from `dist/artifacts.json`; skip-with-warning if no match. Closes the runtime truth-loop on releases: validate-contract (static) + verify-capabilities (runtime) confirm both the source-tree shape AND the actual built binary's GetManifest match plugin.json.
1 parent d179d11 commit dfc3e83

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

.github/workflows/release.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@ jobs:
2424
exit 1
2525
fi
2626
git config --global url."https://x-access-token:${RELEASES_TOKEN}@github.com/GoCodeAlone/".insteadOf "https://github.com/GoCodeAlone/"
27-
- name: Install wfctl v0.62.0
27+
- name: Install wfctl v0.63.1
2828
run: |
2929
mkdir -p "${RUNNER_TEMP}/wfctl-bin"
3030
curl -sSfL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
3131
-o "${RUNNER_TEMP}/wfctl-bin/wfctl" \
32-
"https://github.com/GoCodeAlone/workflow/releases/download/v0.62.0/wfctl-linux-amd64"
32+
"https://github.com/GoCodeAlone/workflow/releases/download/v0.63.1/wfctl-linux-amd64"
3333
chmod +x "${RUNNER_TEMP}/wfctl-bin/wfctl"
3434
- name: Validate plugin contract for publish (pre-build)
3535
run: "${{ runner.temp }}/wfctl-bin/wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} ."
@@ -40,6 +40,19 @@ jobs:
4040
args: release --clean
4141
env:
4242
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
# workflow#765: runtime truth-check via plugin verify-capabilities.
44+
- name: Verify capabilities (runtime truth-check)
45+
run: |
46+
RUNNER_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
47+
BIN=$(jq -r --arg arch "$RUNNER_ARCH" \
48+
'[.[] | select(.type=="Binary" and .goos=="linux" and .goarch==$arch and (.name|startswith("workflow-plugin-hover")))] | .[0].path // ""' \
49+
dist/artifacts.json)
50+
if [ -z "$BIN" ] || [ "$BIN" = "null" ]; then
51+
echo "::warning::No matching linux/$RUNNER_ARCH binary in dist/artifacts.json; skipping verify-capabilities"
52+
jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json
53+
exit 0
54+
fi
55+
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
4356
- name: Unset credentialed git config
4457
if: always()
4558
env:

0 commit comments

Comments
 (0)