Fix publish workflow: use git archive instead of go install
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:
@@ -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 \
|
||||
|
||||
Reference in New Issue
Block a user