Skip to content

Commit 3408b97

Browse files
authored
ci: wire wfctl plugin verify-capabilities + bump wfctl pin to v0.63.1 (workflow#765) (#9)
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 0b1116f commit 3408b97

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
@@ -19,12 +19,12 @@ jobs:
1919
- name: Configure Go private modules
2020
run: git config --global url."https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/".insteadOf "https://github.com/"
2121

22-
- name: Install wfctl v0.62.0
22+
- name: Install wfctl v0.63.1
2323
run: |
2424
mkdir -p "${RUNNER_TEMP}/wfctl-bin"
2525
curl -sSfL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
2626
-o "${RUNNER_TEMP}/wfctl-bin/wfctl" \
27-
"https://github.com/GoCodeAlone/workflow/releases/download/v0.62.0/wfctl-linux-amd64"
27+
"https://github.com/GoCodeAlone/workflow/releases/download/v0.63.1/wfctl-linux-amd64"
2828
chmod +x "${RUNNER_TEMP}/wfctl-bin/wfctl"
2929
- name: Validate plugin contract for publish (pre-build)
3030
run: "${{ runner.temp }}/wfctl-bin/wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} ."
@@ -36,6 +36,19 @@ jobs:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3737
GOPRIVATE: github.com/GoCodeAlone/*
3838
GONOSUMCHECK: github.com/GoCodeAlone/*
39+
# workflow#765: runtime truth-check via plugin verify-capabilities.
40+
- name: Verify capabilities (runtime truth-check)
41+
run: |
42+
RUNNER_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
43+
BIN=$(jq -r --arg arch "$RUNNER_ARCH" \
44+
'[.[] | select(.type=="Binary" and .goos=="linux" and .goarch==$arch and (.name|startswith("workflow-plugin-launchdarkly")))] | .[0].path // ""' \
45+
dist/artifacts.json)
46+
if [ -z "$BIN" ] || [ "$BIN" = "null" ]; then
47+
echo "::warning::No matching linux/$RUNNER_ARCH binary in dist/artifacts.json; skipping verify-capabilities"
48+
jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json
49+
exit 0
50+
fi
51+
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
3952
- name: Sync manifest to registry
4053
if: success() && env.GH_TOKEN != ''
4154
continue-on-error: true

0 commit comments

Comments
 (0)