2
0
Files
mcp-server/.gitea/workflows/release.yml
logikonline 970c02c877
Some checks failed
Release / build (amd64, darwin) (push) Has been cancelled
Release / build (amd64, windows) (push) Has been cancelled
Release / build (amd64, linux) (push) Has been cancelled
Release / build (arm64, linux) (push) Has been cancelled
Release / release (push) Has been cancelled
Release / build (arm64, darwin) (push) Has been cancelled
Fix workflow: use setup-go@v4 for Gitea Actions compatibility
2026-01-11 16:10:16 -05:00

78 lines
1.9 KiB
YAML

name: Release
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: linux-latest
strategy:
matrix:
include:
- goos: linux
goarch: amd64
- goos: linux
goarch: arm64
- goos: darwin
goarch: amd64
- goos: darwin
goarch: arm64
- goos: windows
goarch: amd64
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
cache: false
- name: Build
shell: bash
run: |
VERSION="${GITHUB_REF_NAME#v}"
EXT=""
if [ "${{ matrix.goos }}" = "windows" ]; then
EXT=".exe"
fi
echo "Building for ${{ matrix.goos }}/${{ matrix.goarch }} version ${VERSION}"
CGO_ENABLED=0 GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} \
go build -ldflags "-s -w -X main.version=${VERSION}" \
-o "gitea-mcp-server-${{ matrix.goos }}-${{ matrix.goarch }}${EXT}"
ls -la gitea-mcp-server-*
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: gitea-mcp-server-${{ matrix.goos }}-${{ matrix.goarch }}
path: gitea-mcp-server-*
release:
needs: build
runs-on: linux-latest
steps:
- uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: artifacts
- name: Prepare release files
shell: bash
run: |
mkdir -p release
find artifacts -type f -name 'gitea-mcp-server-*' -exec mv {} release/ \;
cd release && sha256sum * > checksums.txt
ls -la
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: release/*
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}