Skip to content

Merge pull request #1 from tuanphuong-dev/feature/add-mcp.json-for-vs… #21

Merge pull request #1 from tuanphuong-dev/feature/add-mcp.json-for-vs…

Merge pull request #1 from tuanphuong-dev/feature/add-mcp.json-for-vs… #21

Workflow file for this run

name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
build:
strategy:
matrix:
include:
# Linux amd64
- os: ubuntu-latest
goos: linux
goarch: amd64
cgo: 1
# Linux arm64
- os: ubuntu-24.04-arm
goos: linux
goarch: arm64
cgo: 1
# macOS arm64 (Apple Silicon)
- os: macos-latest
goos: darwin
goarch: arm64
cgo: 1
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
cache: true
- name: Install GCC (Linux only)
if: matrix.goos == 'linux'
run: sudo apt-get update && sudo apt-get install -y gcc
- name: Download dependencies
run: go mod download
- name: Build
env:
CGO_ENABLED: ${{ matrix.cgo }}
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
run: go build -ldflags "-s -w -X main.version=${{ github.ref_name }}" -o mimir ./cmd/mimir
- name: Package
run: tar czf mimir-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz mimir
- uses: actions/upload-artifact@v4
with:
name: mimir-${{ matrix.goos }}-${{ matrix.goarch }}
path: mimir-${{ matrix.goos }}-${{ matrix.goarch }}.*
release:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v4
with:
path: artifacts
merge-multiple: true
- name: Checksums
run: |
cd artifacts
sha256sum *.tar.gz *.zip > checksums.txt 2>/dev/null || sha256sum *.tar.gz *.zip | grep -v "can't open" > checksums.txt
- name: Create Release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
artifacts/*.tar.gz
artifacts/*.zip
artifacts/checksums.txt