build.yml: drop Node.js-dependent actions (cache, upload-artifact)

The runner image (golang:*) ships without Node.js, and actions/cache@v4
plus actions/upload-artifact@v4 transitively need it for hashFiles +
artifact upload. Verified by CI failure on first push (run #1, task 710):
"OCI runtime exec failed ... 'node': executable file not found in $PATH".

For now we accept ~20-30s of go module download per run (small project,
fine). Real release artifacts go via release.yml (next task) which will
use curl + Forgejo REST API to upload — pure bash, no Node needed.

Drop the smoke-build artifact upload too — it was only for inspection
during dev. Add `./bin/drover --version` to the linux smoke build so we
get exit-code verification that the CLI bootstraps correctly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-05-01 00:29:09 +03:00
parent 96b6192bb0
commit 956356ff2b
+8 -22
View File
@@ -17,6 +17,12 @@ concurrency:
group: build-${{ github.ref }} group: build-${{ github.ref }}
cancel-in-progress: true cancel-in-progress: true
# We deliberately avoid actions/cache@v4 and actions/upload-artifact@v4 in this
# workflow. They are Node.js-based and the runner image (golang:*) has no Node.
# Installing Node would add ~10s per job for every run; for now we accept
# that go module downloads happen on each invocation (~20-30s once warm).
# Real release artifacts are produced by release.yml via curl + Forgejo API.
jobs: jobs:
test: test:
runs-on: go runs-on: go
@@ -26,14 +32,6 @@ jobs:
git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
git -C /tmp/src checkout "$GITHUB_SHA" git -C /tmp/src checkout "$GITHUB_SHA"
cp -a /tmp/src/. . cp -a /tmp/src/. .
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Vet - name: Vet
run: go vet ./... run: go vet ./...
- name: Test with race - name: Test with race
@@ -42,6 +40,7 @@ jobs:
run: | run: |
mkdir -p bin mkdir -p bin
go build -trimpath -ldflags="-s -w" -o bin/drover ./cmd/drover go build -trimpath -ldflags="-s -w" -o bin/drover ./cmd/drover
./bin/drover --version
build-windows: build-windows:
runs-on: go runs-on: go
@@ -52,14 +51,6 @@ jobs:
git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src git clone --no-checkout "https://forgejo-runner:${GITHUB_TOKEN}@git.okcu.io/${GITHUB_REPOSITORY}.git" /tmp/src
git -C /tmp/src checkout "$GITHUB_SHA" git -C /tmp/src checkout "$GITHUB_SHA"
cp -a /tmp/src/. . cp -a /tmp/src/. .
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: ${{ runner.os }}-go-
- name: Cross-compile drover.exe (windows/amd64) - name: Cross-compile drover.exe (windows/amd64)
env: env:
GOOS: windows GOOS: windows
@@ -75,9 +66,4 @@ jobs:
-X main.BuildDate=${BUILD_DATE}" \ -X main.BuildDate=${BUILD_DATE}" \
-o bin/drover.exe ./cmd/drover -o bin/drover.exe ./cmd/drover
ls -la bin/ ls -la bin/
- name: Upload artifact sha256sum bin/drover.exe
uses: actions/upload-artifact@v4
with:
name: drover-windows-amd64-${{ github.sha }}
path: bin/drover.exe
retention-days: 14