From e64efff025521ffa247055ff3889b05596a367a6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 13:06:01 +0000 Subject: [PATCH 1/3] Initial plan From 354d92e39407a9ccf732148ba410342799be2895 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 15 May 2026 13:15:18 +0000 Subject: [PATCH 2/3] Fix snapshot releases to include wfctl binaries; add setup-wfctl composite action Agent-Logs-Url: https://github.com/GoCodeAlone/workflow/sessions/20359d07-314d-4038-a59d-227bc3173c6c Co-authored-by: intel352 <77607+intel352@users.noreply.github.com> --- .github/actions/setup-wfctl/action.yml | 96 ++++++++++++++++++++++++++ .github/workflows/pre-release.yml | 6 ++ 2 files changed, 102 insertions(+) create mode 100644 .github/actions/setup-wfctl/action.yml diff --git a/.github/actions/setup-wfctl/action.yml b/.github/actions/setup-wfctl/action.yml new file mode 100644 index 00000000..cfa7f1c6 --- /dev/null +++ b/.github/actions/setup-wfctl/action.yml @@ -0,0 +1,96 @@ +name: Setup wfctl +description: Download and install a specific version of wfctl from GitHub Releases. + +inputs: + version: + description: > + wfctl version to install (e.g. v0.52.0). Use "latest" to install the + most recent stable release. + required: false + default: latest + +outputs: + version: + description: The resolved wfctl version that was installed. + value: ${{ steps.resolve.outputs.version }} + +runs: + using: composite + steps: + - name: Resolve version + id: resolve + shell: bash + run: | + VERSION="${{ inputs.version }}" + if [ "${VERSION}" = "latest" ]; then + VERSION=$(curl -fsSL \ + -H "Accept: application/vnd.github+json" \ + -H "X-GitHub-Api-Version: 2022-11-28" \ + "https://api.github.com/repos/GoCodeAlone/workflow/releases/latest" \ + | jq -r .tag_name) + fi + if [ -z "${VERSION}" ] || [ "${VERSION}" = "null" ]; then + echo "error: could not resolve wfctl version" >&2 + exit 1 + fi + echo "version=${VERSION}" >> "$GITHUB_OUTPUT" + + - name: Download wfctl + shell: bash + run: | + set -euo pipefail + VERSION="${{ steps.resolve.outputs.version }}" + OS="${{ runner.os }}" + ARCH="${{ runner.arch }}" + + # Map GitHub Actions runner values to Go GOOS/GOARCH naming + case "${OS}" in + Linux) GOOS=linux ;; + macOS) GOOS=darwin ;; + Windows) GOOS=windows ;; + *) + echo "Unsupported OS: ${OS}" >&2 + exit 1 + ;; + esac + case "${ARCH}" in + X64) GOARCH=amd64 ;; + ARM64) GOARCH=arm64 ;; + *) + echo "Unsupported architecture: ${ARCH}" >&2 + exit 1 + ;; + esac + + ASSET="wfctl-${GOOS}-${GOARCH}" + if [ "${GOOS}" = "windows" ]; then + ASSET="${ASSET}.exe" + fi + + DOWNLOAD_URL="https://github.com/GoCodeAlone/workflow/releases/download/${VERSION}/${ASSET}" + echo "Downloading wfctl ${VERSION} from ${DOWNLOAD_URL}" + + # Install into a directory that is (or will be) on PATH. + # Use RUNNER_TOOL_CACHE when available (hosted runners); fall back to + # a per-run temp dir so the binary is always reachable. + INSTALL_DIR="${RUNNER_TOOL_CACHE:-${RUNNER_TEMP}}/wfctl/${VERSION}" + mkdir -p "${INSTALL_DIR}" + + DEST="${INSTALL_DIR}/wfctl" + if [ "${GOOS}" = "windows" ]; then + DEST="${DEST}.exe" + fi + + curl -fsSL "${DOWNLOAD_URL}" -o "${DEST}" || { + echo "error: failed to download wfctl ${VERSION} for ${GOOS}/${GOARCH}" >&2 + echo " URL: ${DOWNLOAD_URL}" >&2 + echo " Verify the release exists: https://github.com/GoCodeAlone/workflow/releases/tag/${VERSION}" >&2 + exit 1 + } + chmod +x "${DEST}" + echo "${INSTALL_DIR}" >> "$GITHUB_PATH" + echo "Installed wfctl ${VERSION} to ${DEST}" + + - name: Verify installation + shell: bash + run: wfctl --version diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index cb913cb5..1d393343 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -102,6 +102,12 @@ jobs: GOOS=darwin GOARCH=arm64 go build -ldflags="${LDFLAGS}" -o dist/workflow-darwin-arm64 ./cmd/server GOOS=windows GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o dist/workflow-windows-amd64.exe ./cmd/server + GOOS=linux GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o dist/wfctl-linux-amd64 ./cmd/wfctl + GOOS=linux GOARCH=arm64 go build -ldflags="${LDFLAGS}" -o dist/wfctl-linux-arm64 ./cmd/wfctl + GOOS=darwin GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o dist/wfctl-darwin-amd64 ./cmd/wfctl + GOOS=darwin GOARCH=arm64 go build -ldflags="${LDFLAGS}" -o dist/wfctl-darwin-arm64 ./cmd/wfctl + GOOS=windows GOARCH=amd64 go build -ldflags="${LDFLAGS}" -o dist/wfctl-windows-amd64.exe ./cmd/wfctl + - name: Package admin UI run: | tar -czf "dist/workflow-admin-ui-${VERSION}.tar.gz" -C ui dist From 018e8db4774a237ccf67afc15557915844682f3d Mon Sep 17 00:00:00 2001 From: Jon Langevin Date: Fri, 15 May 2026 09:33:26 -0400 Subject: [PATCH 3/3] fix: reject unsupported wfctl windows arm64 --- .github/actions/setup-wfctl/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/setup-wfctl/action.yml b/.github/actions/setup-wfctl/action.yml index cfa7f1c6..a0af7200 100644 --- a/.github/actions/setup-wfctl/action.yml +++ b/.github/actions/setup-wfctl/action.yml @@ -61,6 +61,10 @@ runs: exit 1 ;; esac + if [ "${GOOS}" = "windows" ] && [ "${GOARCH}" = "arm64" ]; then + echo "Unsupported platform: Windows ARM64 wfctl release assets are not published" >&2 + exit 1 + fi ASSET="wfctl-${GOOS}-${GOARCH}" if [ "${GOOS}" = "windows" ]; then