From 6ee25a7a278e8f0d56fa711da2ce6eddb97f6481 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 2 Oct 2026 04:41:44 +0100 Subject: [PATCH] ci: use the shared pull request, release and autoupdate workflows (#1) * ci(release): add goreleaser and semver configuration The release builds only cmd/readitall for Linux, macOS and Windows on amd64 and arm64. The checksum file is signed with cosign. The semver config uses regex matching. A major release needs an explicit trailer line. * ci: add shared pull request, release and autoupdate workflows The workflows call the shared workflows in lukaszraczylo/shared-actions. The release runs on push to main when Go files change. * docs: describe release binary installation The README now tells you to download a binary from the GitHub release page. * fix(browser): remove the unused mutex field of SessionStore Staticcheck reports U1000 for the field. No method locks it. The pull request checks fail until the field is removed. --- .github/workflows/autoupdate.yaml | 20 ++++++++++ .github/workflows/pr.yaml | 22 +++++++++++ .github/workflows/release.yaml | 23 ++++++++++++ .goreleaser.yaml | 61 +++++++++++++++++++++++++++++++ README.md | 7 +++- internal/browser/session.go | 3 -- semver.yaml | 20 ++++++++++ 7 files changed, 152 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/autoupdate.yaml create mode 100644 .github/workflows/pr.yaml create mode 100644 .github/workflows/release.yaml create mode 100644 .goreleaser.yaml create mode 100644 semver.yaml diff --git a/.github/workflows/autoupdate.yaml b/.github/workflows/autoupdate.yaml new file mode 100644 index 0000000..77c13b2 --- /dev/null +++ b/.github/workflows/autoupdate.yaml @@ -0,0 +1,20 @@ +name: Autoupdate go.mod and go.sum + +on: + workflow_dispatch: + schedule: + - cron: "0 3 * * *" + +permissions: + contents: write + actions: write + pull-requests: write + security-events: write + +jobs: + autoupdate: + uses: lukaszraczylo/shared-actions/.github/workflows/go-autoupdate.yaml@main + with: + go-version: ">=1.26" + release-workflow: "release.yaml" + secrets: inherit diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml new file mode 100644 index 0000000..e6f935b --- /dev/null +++ b/.github/workflows/pr.yaml @@ -0,0 +1,22 @@ +name: Pull Request + +on: + pull_request: + branches: + - main + push: + branches: + - "**" + - "!main" + +permissions: + contents: write + actions: write + pull-requests: write + security-events: write + +jobs: + pr-checks: + uses: lukaszraczylo/shared-actions/.github/workflows/go-pr.yaml@main + with: + go-version: ">=1.26" diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..90a7679 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,23 @@ +name: Release + +on: + push: + branches: + - main + paths: + - "**.go" + - "go.mod" + - "go.sum" + workflow_dispatch: + +permissions: + contents: write + packages: write + id-token: write + +jobs: + release: + uses: lukaszraczylo/shared-actions/.github/workflows/go-release.yaml@main + with: + go-version: ">=1.26" + secrets: inherit diff --git a/.goreleaser.yaml b/.goreleaser.yaml new file mode 100644 index 0000000..8824143 --- /dev/null +++ b/.goreleaser.yaml @@ -0,0 +1,61 @@ +version: 2 + +builds: + - id: readitall + main: ./cmd/readitall + binary: readitall + env: + - CGO_ENABLED=0 + goos: + - linux + - darwin + - windows + goarch: + - amd64 + - arm64 + flags: + - -trimpath + ldflags: + - -s -w + +archives: + - id: readitall + formats: [tar.gz] + name_template: "readitall-{{ .Version }}-{{ .Os }}-{{ .Arch }}" + format_overrides: + - goos: windows + formats: [zip] + files: + - README.md + +checksum: + name_template: "readitall-{{ .Version }}-checksums.txt" + algorithm: sha256 + +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' + - '^Merge' + - '^WIP' + +release: + github: + owner: lukaszraczylo + name: mcp-readitall + name_template: "Release {{.Version}}" + draft: false + prerelease: auto + +signs: + - cmd: cosign + signature: "${artifact}.sigstore.json" + args: + - sign-blob + - "--bundle=${signature}" + - "${artifact}" + - "--yes" + artifacts: checksum + output: true diff --git a/README.md b/README.md index e6a23ab..868d965 100644 --- a/README.md +++ b/README.md @@ -64,7 +64,12 @@ to stop waiting and save the session. ## Build & install -Requirements: +Each [GitHub release](https://github.com/lukaszraczylo/mcp-readitall/releases) +contains `readitall` binaries for Linux, macOS and Windows (amd64 and arm64). +Download the archive for your platform and put `readitall` on your `$PATH`. +The browser requirement below still applies. + +To build from source, use the following requirements: - Go 1.22+ - A Chromium-family browser on `$PATH` or installed at the standard diff --git a/internal/browser/session.go b/internal/browser/session.go index 9458793..e9277c6 100644 --- a/internal/browser/session.go +++ b/internal/browser/session.go @@ -9,7 +9,6 @@ import ( "path/filepath" "sort" "strings" - "sync" "time" ) @@ -20,8 +19,6 @@ import ( // is the same as Playwright's storage state so sessions are interchangeable. type SessionStore struct { root string - - mu sync.Mutex } // SessionInfo describes a persisted session, returned to the MCP client by diff --git a/semver.yaml b/semver.yaml new file mode 100644 index 0000000..e2d503a --- /dev/null +++ b/semver.yaml @@ -0,0 +1,20 @@ +version: 1 +matching: regex + +force: + major: 0 + minor: 1 + patch: 0 + +blacklist: + - "Merge branch" + - "Merge pull request" + - "WIP" + +wording: + minor: + - '(?m)^feat(\(.+\))?!?:' + patch: + - '(?m)^(fix|chore|docs|test|style|refactor|build|ci|perf)(\(.+\))?:' + major: + - '(?m)^Semver-Major:'