Fix publish workflow: use git archive instead of go install
All checks were successful
CI / test (push) Successful in 51s
Publish / publish (push) Successful in 51s

golang.org/x/mod/zip is a library, not a CLI tool. Use git archive
with --prefix to create the module zip in the format Gitea expects.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-23 10:39:35 +03:00
parent 85cdc5e2c9
commit b6350185d9

View File

@@ -24,9 +24,9 @@ jobs:
run: |
VERSION=${GITHUB_REF#refs/tags/}
MODULE=$(go list -m)
go mod download
GOFLAGS=-mod=mod go install golang.org/x/mod/zip@latest
zip -r module.zip . -x '.git/*' '.gitea/*'
# Create module zip with required prefix: module@version/
git archive --format=zip --prefix="${MODULE}@${VERSION}/" HEAD -o module.zip
# Gitea Go Package Registry API
curl -s -f \