Skip to content

Commit fe9b185

Browse files
authored
ci: wire wfctl plugin verify-capabilities + bump wfctl pin to v0.63.1 (workflow#765) (#7)
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 187905f commit fe9b185

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
@@ -15,12 +15,12 @@ jobs:
1515
- uses: actions/setup-go@v6
1616
with:
1717
go-version-file: go.mod
18-
- name: Install wfctl v0.62.0
18+
- name: Install wfctl v0.63.1
1919
run: |
2020
mkdir -p "${RUNNER_TEMP}/wfctl-bin"
2121
curl -sSfL -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
2222
-o "${RUNNER_TEMP}/wfctl-bin/wfctl" \
23-
"https://github.com/GoCodeAlone/workflow/releases/download/v0.62.0/wfctl-linux-amd64"
23+
"https://github.com/GoCodeAlone/workflow/releases/download/v0.63.1/wfctl-linux-amd64"
2424
chmod +x "${RUNNER_TEMP}/wfctl-bin/wfctl"
2525
- name: Validate plugin contract for publish (pre-build)
2626
run: "${{ runner.temp }}/wfctl-bin/wfctl plugin validate-contract --for-publish --tag ${{ github.ref_name }} ."
@@ -31,6 +31,19 @@ jobs:
3131
args: release --clean
3232
env:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
# workflow#765: runtime truth-check via plugin verify-capabilities.
35+
- name: Verify capabilities (runtime truth-check)
36+
run: |
37+
RUNNER_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
38+
BIN=$(jq -r --arg arch "$RUNNER_ARCH" \
39+
'[.[] | select(.type=="Binary" and .goos=="linux" and .goarch==$arch and (.name|startswith("workflow-plugin-analytics")))] | .[0].path // ""' \
40+
dist/artifacts.json)
41+
if [ -z "$BIN" ] || [ "$BIN" = "null" ]; then
42+
echo "::warning::No matching linux/$RUNNER_ARCH binary in dist/artifacts.json; skipping verify-capabilities"
43+
jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json
44+
exit 0
45+
fi
46+
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
3447
- name: Publish GitHub release
3548
if: ${{ success() }}
3649
env:

0 commit comments

Comments
 (0)