Upgrade Go toolchain pins and add Gitea Actions CI checks

Bump the go directive and mise tool pin to Go 1.27.1, the newest toolchain available in the build environment; module versions already resolve to the newest releases present in the pinned module cache.

Add .gitea/workflows/ci.yml, which runs on every pull request and every push to main and invokes scripts/check.sh (gofmt, go mod verify, go vet, go build, go test -cover). Also cover the Gitea client token/slug handling with unit tests and document the CI workflow.

Add the mise check task so the CI checks can be run locally.
This commit is contained in:
software-maintainer committed 2026-10-28 07:45:30 +00:00
1 parent 55d4259f4a
commit 1fbb05339c
6 files changed
+181 -3

No files matched your search

+23 -1
View File
@@ -18,6 +18,28 @@ It works with any project type and supports monorepos.
---
## Continuous Integration
Every pull request and every push to `main` runs the `ci` workflow in
[`.gitea/workflows/ci.yml`](../.gitea/workflows/ci.yml). Its single `check` job
runs [`scripts/check.sh`](../scripts/check.sh), which:
1. fails if any Go file is not `gofmt`-formatted,
2. runs `go mod verify` to confirm the dependency modules match `go.sum`,
3. runs `go vet ./...` and `go build ./...`,
4. runs `go test -cover ./...`.
Run the same checks locally with:
```sh
./scripts/check.sh
```
The job fails when any check fails, so a pull request cannot land with broken
code or tests.
---
## Two Release Workflows
### Direct release
@@ -483,4 +505,4 @@ Tag format: `<name>@v<version>` for monorepos (e.g. `my-app@v1.3.0`), or `v<vers
| `GITHUB_TOKEN` | GitHub token — automatically injected by GitHub Actions; no setup needed |
| `GITEA_TOKEN` | Auto-injected by Gitea Actions with limited scopes — **do not use this for stamp** |
| `STAMP_GITEA_TOKEN` | PAT you create manually with `repository` (read/write) and `issue` (read/write) scopes. The name `GITEA_TOKEN` is reserved by Gitea Actions, so a different name is required. |
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — presence of this variable also activates Gitea mode |
| `GITEA_BASE_URL` | Gitea instance URL (e.g. `https://gitea.example.com`) — presence of this variable also activates Gitea mode |