Skip to content

Commit

Permalink
chore: add CI to make prebuilt binary
Browse files Browse the repository at this point in the history
  • Loading branch information
macrat committed Dec 20, 2024
1 parent 82f3c48 commit 77e46fa
Show file tree
Hide file tree
Showing 3 changed files with 111 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI

on:
push:

jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.23.x
- uses: actions/checkout@v3
- name: Test
run: go test -race ./...

analyze:
name: CodeQL
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: github/codeql-action/init@v2
with:
languages: go
- uses: github/codeql-action/analyze@v2

release:
name: Release
needs: [test, analyze]
if: "contains(github.ref, 'tags/v')"
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.23.x
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install upx-ucl
run: sudo apt install upx-ucl -y
- uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58 changes: 58 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
before:
hooks:
- go mod tidy

builds:
- id: with-upx
env:
- CGO_ENABLED=0
goos:
- linux
flags:
- -trimpath
ldflags:
- '-s -w'
- '-X main.Version={{ .Version }}'
- '-X main.Commit={{ .ShortCommit }}'
hooks:
post: 'upx-ucl --lzma {{ .Path }}'
- id: without-upx
env:
- CGO_ENABLED=0
goos:
- windows
- darwin
flags:
- -trimpath
ldflags:
- '-s -w'
- '-X main.Version={{ .Version }}'
- '-X main.Commit={{ .ShortCommit }}'

archives:
- format: tar.gz
name_template: >-
{{- .ProjectName -}}
_
{{- .Version -}}
_
{{- .Os -}}
_
{{- if eq .Arch "386" -}}
i386
{{- else if eq .Arch "amd64" -}}
x86_64
{{- else -}}
{{- .Arch -}}
{{- end -}}
format_overrides:
- goos: windows
format: zip
files: [none*]

changelog:
filters:
exclude:
- '^chore'
- '^docs'
- '^test'
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ This server allows you to explore and manipulate kintone data using AI tools suc

### 1. Install

Pre-build binaries are not available yet. Please build from source.
Download the latest release from the [rleases page](https://github.com/macrat/mcp-server-kintone/releases).
You can place the executable file anywhere you like.


### 2. Configure mcp-server-kintone
Expand All @@ -24,7 +25,7 @@ Create a configuration file like below:
"apps": [
{
"id": "<your-app-id>",
"description": "<your-app-description>"
"description": "<your-app-description>",
"permissions": {
"read": true,
"write": false,
Expand Down

0 comments on commit 77e46fa

Please # to comment.