Files
gitea-mcp-extended/.gitea/workflows/release-tag.yml
Andrew Miller 9b407fb70a
Some checks failed
release-nightly / publish-nightly (push) Failing after 8s
release / goreleaser (push) Failing after 1m12s
release / publish-packages (push) Has been skipped
fix: add GIT_SSL_NO_VERIFY for Cloudflare origin cert in CI
The runner containers don't trust the Cloudflare origin certificate
for git.lethalbits.com, causing checkout to fail. Set GIT_SSL_NO_VERIFY
and Go private module env vars at the workflow level for all workflows.
2026-03-05 13:06:37 -05:00

69 lines
2.3 KiB
YAML

name: release
on:
push:
tags: ["*"]
env:
GIT_SSL_NO_VERIFY: true
GOPRIVATE: git.lethalbits.com/*
GONOSUMCHECK: git.lethalbits.com/*
GOINSECURE: git.lethalbits.com/*
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-go@v6
with:
go-version: stable
- run: go install github.com/goreleaser/goreleaser/v2@latest
- run: goreleaser release --clean
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_FORCE_TOKEN: "gitea"
publish-packages:
runs-on: ubuntu-latest
needs: goreleaser
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- name: Build all platforms
run: |
VERSION=${GITHUB_REF_NAME#v}
TARGETS="linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 windows/amd64"
for target in $TARGETS; do
OS=${target%/*}
ARCH=${target#*/}
# Match goreleaser naming
case $ARCH in amd64) UARCH=x86_64;; arm64) UARCH=arm64;; esac
case $OS in linux) UOS=Linux;; darwin) UOS=Darwin;; windows) UOS=Windows;; esac
EXT=tar.gz; [ "$OS" = "windows" ] && EXT=zip
OUTDIR="dist/gitea-mcp-extended_${UOS}_${UARCH}"
mkdir -p "$OUTDIR"
CGO_ENABLED=0 GOOS=$OS GOARCH=$ARCH \
go build -trimpath -ldflags "-s -w -X main.Version=$VERSION" \
-o "$OUTDIR/gitea-mcp-extended$([ $OS = windows ] && echo .exe)"
ARCHIVE="gitea-mcp-extended_${UOS}_${UARCH}.${EXT}"
if [ "$EXT" = "zip" ]; then
(cd "$OUTDIR" && zip -r "../../$ARCHIVE" .)
else
tar czf "$ARCHIVE" -C "$OUTDIR" .
fi
done
- name: Publish to Generic Package Registry
run: |
VERSION=${GITHUB_REF_NAME#v}
for f in gitea-mcp-extended_*.{tar.gz,zip}; do
[ -f "$f" ] || continue
curl -sf --user "${{ gitea.actor }}:${{ secrets.GITHUB_TOKEN }}" \
--upload-file "$f" \
"${{ gitea.server_url }}/api/packages/lethalbits/generic/gitea-mcp-extended/${VERSION}/${f}"
done