Skip to content

Commit 677cd00

Browse files
authored
ci: wire wfctl plugin verify-capabilities + bump wfctl pin to v0.63.1 (workflow#765) (#10)
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 06a660e commit 677cd00

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
go-version: '1.26'
2020
- name: Configure Git for private repos
2121
run: git config --global url."https://x-access-token:${{ secrets.RELEASES_TOKEN }}@github.com/".insteadOf "https://github.com/"
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 }} ."
@@ -34,6 +34,19 @@ jobs:
3434
args: release --clean
3535
env:
3636
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
37+
# workflow#765: runtime truth-check via plugin verify-capabilities.
38+
- name: Verify capabilities (runtime truth-check)
39+
run: |
40+
RUNNER_ARCH=$(uname -m | sed 's/x86_64/amd64/;s/aarch64/arm64/')
41+
BIN=$(jq -r --arg arch "$RUNNER_ARCH" \
42+
'[.[] | select(.type=="Binary" and .goos=="linux" and .goarch==$arch and (.name|startswith("workflow-plugin-ws-auth")))] | .[0].path // ""' \
43+
dist/artifacts.json)
44+
if [ -z "$BIN" ] || [ "$BIN" = "null" ]; then
45+
echo "::warning::No matching linux/$RUNNER_ARCH binary in dist/artifacts.json; skipping verify-capabilities"
46+
jq '.[] | {name, type, goos, goarch, path}' dist/artifacts.json
47+
exit 0
48+
fi
49+
"${{ runner.temp }}/wfctl-bin/wfctl" plugin verify-capabilities --binary "$BIN" .
3750
- name: Publish GitHub release
3851
if: ${{ success() }}
3952
env:

0 commit comments

Comments
 (0)