Commit Graph

22 Commits

Author SHA1 Message Date
Lunny Xiao 7fce9bc790 ci: upload release artifacts to Cloudflare R2 (#237)
Release binaries are currently only attached to the Gitea release, with no mirror on the download CDN. This adds a Cloudflare R2 upload to the tag release workflow, following the approach used by [gitea/tea](https://gitea.com/gitea/tea).

- Add `scripts/upload-r2.sh`, taken from `gitea/tea`: it uploads a single file to an R2 object key with curl's built-in AWS SigV4 signer (R2 is S3-API compatible), and supports a `--check-config` preflight mode. Credentials are passed through a curl config file on stdin so they never appear in `ps` output.
- Add a `Check R2 configuration` step at the beginning of the `goreleaser` job, so a missing `R2_*` secret fails the run before anything is built or published.
- Add an `Upload binaries to Cloudflare R2` step after GoReleaser, which mirrors every archive and `checksums.txt` from `dist/` to `gitea-mcp/<version>/<file>` in the bucket. `tea` does this with a goreleaser `publishers:` entry, but that is a GoReleaser Pro feature and this repository uses the OSS distribution, so the upload runs as a workflow step instead.

Required repository secrets: `R2_ENDPOINT`, `R2_BUCKET`, `R2_ACCESS_KEY_ID`, `R2_SECRET_ACCESS_KEY`. No AWS S3 upload is added; Cloudflare R2 is the only mirror.

Tested locally by pointing `R2_ENDPOINT` at a local HTTP server and verifying the script builds the expected path-style URL and signed request, plus `shellcheck` on the script.

_Authored by Codet (GPT-5-Codex) on behalf of @lunny._

---------

Co-authored-by: bircni <bircni@icloud.com>
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/237
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2026-08-17 17:15:32 +00:00
Renovate Bot 1f5fe9269b chore(deps): update dependencies (#235)
This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [docker/dockerfile](https://github.com/moby/buildkit) | syntax | minor | `1.25` → `1.26` |
| [docker/login-action](https://github.com/docker/login-action) ([changelog](https://github.com/docker/login-action/compare/371161bbe7024a29a25c5e19bfcbc0804fe9ad2c..dbcb813823bdd20940b903addbd779551569679f)) | action | digest | `371161b` → `dbcb813` |

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xOTEuMiIsInVwZGF0ZWRJblZlciI6IjQzLjE5MS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/235
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
2026-08-10 20:47:34 +00:00
Bo-Yi Wu efcbdbb17f refactor: replace mcp-go with the official MCP Go SDK (#223)
## Summary

Replace `github.com/mark3labs/mcp-go` with the official
`github.com/modelcontextprotocol/go-sdk v1.7.0`.

All 54 existing tools, scopes, CLI, `stdio` and HTTP (`/mcp`) modes, and
per-request authentication remain supported. This PR is limited to the SDK
equivalence migration; the stateless 2026 HTTP transport is deferred to a
follow-up PR.

## Verification

- Tool definitions were compared with `main` and matched for all 54 tools.
- `make lint`, `make fmt`, `go test -count=1 -race ./...`, `make build`, and
  `make tidy` pass.

---------

Co-authored-by: bircni <bircni@icloud.com>
Co-authored-by: silverwind <me@silverwind.io>
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/223
Reviewed-by: silverwind <2021+silverwind@noreply.gitea.com>
Reviewed-by: bircni <bircni@icloud.com>
Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2026-08-06 05:36:21 +00:00
silverwind 8b236c2e26 chore: align go version handling with gitea (#226)
Aligns Go version handling with gitea, see https://github.com/go-gitea/gitea/pull/38559. `toolchain` names the build version, `go` stays the minimum.

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/226
Reviewed-by: techknowlogick <9+techknowlogick@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
2026-08-05 22:50:18 +00:00
Renovate Bot 3fcd864582 chore(deps): update dependencies (#225)
Co-authored-by: Renovate Bot <renovate-bot@gitea.com>
2026-08-03 13:18:41 +00:00
silverwind 653781a199 fix: replace goreleaser-action with direct go install
The goreleaser/goreleaser-action@v7 JS wrapper was crashing in CI
before goreleaser could run. Install goreleaser via `go install`
instead to avoid the action's compatibility issues with the runner.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 02:09:18 +01:00
silverwind bb9470a259 chore: update Go and Actions dependencies (#132)
## Summary
- Update Go dependencies: gitea SDK v0.22.1→v0.23.2, mcp-go v0.42.0→v0.44.0, zap v1.27.0→v1.27.1, go-version v1.7.0→v1.8.0, x/crypto v0.43.0→v0.48.0, x/sys v0.37.0→v0.41.0
- Update Actions: checkout v4→v6, setup-go v5→v6, build-push-action v5→v6, goreleaser-action v6→v7

## Test plan
- [x] `go test ./...` passes
- [x] `make build` succeeds

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/132
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-02-22 17:10:25 +00:00
silverwind 8728c04748 chore: add golangci-lint, bump Go to 1.26, fix all lint issues (#133)
## Summary
- Add `.golangci.yml` with linter configuration matching the main gitea repo
- Add `lint`, `lint-fix`, `lint-go`, `lint-go-fix`, and `security-check` Makefile targets
- Add `tidy` Makefile target (extracts min Go version from `go.mod` for `-compat` flag)
- Bump minimum Go version to 1.26
- Update golangci-lint to v2.10.1
- Replace `golang/govulncheck-action` with `make security-check` in CI
- Add `make lint` step to CI
- Fix all lint issues across the codebase (formatting, `errors.New` vs `fmt.Errorf`, `any` vs `interface{}`, unused returns, stuttering names, Go 1.26 `new(expr)`, etc.)
- Remove unused `pkg/ptr` package (inlined by Go 1.26 `new(expr)`)
- Remove dead linter exclusions (staticcheck, gocritic, testifylint, dupl)

## Test plan
- [x] `make lint` passes
- [x] `go test ./...` passes
- [x] `make build` succeeds

Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/133
Reviewed-by: techknowlogick <techknowlogick@noreply.gitea.com>
Co-authored-by: silverwind <me@silverwind.io>
Co-committed-by: silverwind <me@silverwind.io>
2026-02-22 17:10:04 +00:00
Bo-Yi Wu de311344cd ci: pass repository version as build argument in workflow
- Add build argument to pass the repository version to the workflow

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2025-09-15 15:09:16 +08:00
appleboy b35919989f ci: update CI environment variables for better token management
- Replace `GITHUB_TOKEN` with `GITEA_TOKEN` and add `GORELEASER_FORCE_TOKEN` environment variable

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:41:04 +08:00
appleboy 6993bb2b5d ci: integrate GoReleaser for streamlined release management
- Rename job from `release` to `goreleaser` in `release-tag.yml`
- Change the tag pattern from `' * '` to `" * "` in `release-tag.yml`
- Update job steps to better describe their actions in `release-tag.yml`
- Replace build steps with GoReleaser action steps in `release-tag.yml`
- Add configuration file `.goreleaser.yaml` for GoReleaser
- Include hooks, builds, archives, changelog sorting, and release footer in `.goreleaser.yaml`

Signed-off-by: appleboy <appleboy.tw@gmail.com>
2025-04-08 21:34:03 +08:00
hiifong 1965c9830b fix bug 2025-04-06 14:59:06 +00:00
hiifong a784029828 Update Dockerfile 2025-04-06 15:30:28 +08:00
hiifong f27c4c622d Update Dockerfile 2025-04-06 15:28:05 +08:00
hiifong df47a0c9eb Add Dockerfile 2025-04-06 13:09:14 +08:00
hiifong afada4435e Add Dockerfile (#15)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/15
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:46:27 +00:00
hiifong 6285bd2467 test (#14)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/14
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:12:06 +00:00
hiifong 5bbf8e0afb Add Dockerfile (#13)
Reviewed-on: https://gitea.com/gitea/gitea-mcp/pulls/13
Co-authored-by: hiifong <f@ilo.nz>
Co-committed-by: hiifong <f@ilo.nz>
2025-04-06 04:06:34 +00:00
Lunny Xiao d6ca289f03 Add arm64 releases 2025-03-23 18:17:12 -07:00
Lunny Xiao e0d34fe7d1 Add release tag ci 2025-03-23 14:52:35 -07:00
Lunny Xiao 09e0275952 Add vul check 2025-03-23 12:25:48 -07:00
Lunny Xiao 721889e586 Add ci for pull request 2025-03-23 12:16:05 -07:00