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: |
|
run: |
|
||||||
VERSION=${GITHUB_REF#refs/tags/}
|
VERSION=${GITHUB_REF#refs/tags/}
|
||||||
MODULE=$(go list -m)
|
MODULE=$(go list -m)
|
||||||
go mod download
|
|
||||||
GOFLAGS=-mod=mod go install golang.org/x/mod/zip@latest
|
# Create module zip with required prefix: module@version/
|
||||||
zip -r module.zip . -x '.git/*' '.gitea/*'
|
git archive --format=zip --prefix="${MODULE}@${VERSION}/" HEAD -o module.zip
|
||||||
|
|
||||||
# Gitea Go Package Registry API
|
# Gitea Go Package Registry API
|
||||||
curl -s -f \
|
curl -s -f \
|
||||||
|
|||||||
Reference in New Issue
Block a user