From d7e65da911bcd0c92d95d765e87f4d18fa92bdb7 Mon Sep 17 00:00:00 2001 From: satyakwok Date: Thu, 7 May 2026 14:24:13 +0200 Subject: [PATCH 1/3] ci: add CI + Release + owner auto-merge + dependabot CI: lint + typecheck + test + build per PR/push. Release: triggers on git tag v*; runs build, publishes to npm (@sentrix/chain), creates GitHub release with generated notes. Requires NPM_TOKEN secret in repo settings. Owner auto-merge: mirrors sentrix-labs/sentrix. Dependabot: weekly npm grouped + monthly actions. --- .github/dependabot.yml | 17 ++++++++++ .github/workflows/ci.yml | 35 ++++++++++++++++++++ .github/workflows/owner-auto-merge.yml | 27 ++++++++++++++++ .github/workflows/release.yml | 44 ++++++++++++++++++++++++++ 4 files changed, 123 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/owner-auto-merge.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..b5c9644 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,17 @@ +version: 2 +updates: + - package-ecosystem: "npm" + directory: "/" + schedule: + interval: "weekly" + open-pull-requests-limit: 5 + groups: + tooling: + patterns: ["typescript", "@types/*", "tsup", "vitest", "eslint*", "@typescript-eslint/*"] + runtime: + patterns: ["viem", "alloy*"] + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "monthly" diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a016359 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: [main] + push: + branches: [main] + +permissions: + contents: read + +jobs: + build: + name: lint + typecheck + test + build + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v5 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Setup Node 20 + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + + - run: pnpm install --frozen-lockfile + - run: pnpm lint + - run: pnpm typecheck + - run: pnpm test + - run: pnpm build diff --git a/.github/workflows/owner-auto-merge.yml b/.github/workflows/owner-auto-merge.yml new file mode 100644 index 0000000..fe274ba --- /dev/null +++ b/.github/workflows/owner-auto-merge.yml @@ -0,0 +1,27 @@ +name: Owner auto-merge + +on: + pull_request_target: + types: [opened, reopened, synchronize, ready_for_review] + +permissions: + pull-requests: write + contents: write + +jobs: + enable-auto-merge: + runs-on: ubuntu-22.04 + if: > + github.event.pull_request.user.login == 'satyakwok' && + github.event.pull_request.draft == false + steps: + - name: Enable auto-merge (squash) for owner PR + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + run: | + set -e + gh pr merge --auto --squash "$PR_URL" || { + echo "::warning::auto-merge enable returned non-zero — PR may already be merged, conflicted, or have auto-merge already enabled." + exit 0 + } diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..fe5709d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + tags: + - 'v*' + +permissions: + contents: write + +jobs: + publish: + name: Publish to npm + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v5 + + - name: Install pnpm + uses: pnpm/action-setup@v4 + with: + version: 9 + run_install: false + + - name: Setup Node 20 with npm registry + uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'pnpm' + registry-url: 'https://registry.npmjs.org' + + - run: pnpm install --frozen-lockfile + - run: pnpm typecheck + - run: pnpm test + - run: pnpm build + + - name: Publish to npm + run: pnpm publish --no-git-checks --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Create GitHub release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release create "${GITHUB_REF_NAME}" --generate-notes From 2fb04a62bbff331a84106f8caaa224649e4ad8f1 Mon Sep 17 00:00:00 2001 From: satyakwok Date: Thu, 7 May 2026 14:56:46 +0200 Subject: [PATCH 2/3] ci: drop pnpm lint (eslint not installed in this repo) The 'lint' script in package.json runs 'eslint src' but eslint isn't in devDependencies. Either path forward (add eslint + config OR drop lint from CI) is operator-territory; for now CI matches what the repo can actually run. --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a016359..f8ddcde 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,6 @@ jobs: cache: 'pnpm' - run: pnpm install --frozen-lockfile - - run: pnpm lint - run: pnpm typecheck - run: pnpm test - run: pnpm build From 12b234a0399a64fb86abf0a7843abea9fa11d172 Mon Sep 17 00:00:00 2001 From: satyakwok Date: Thu, 7 May 2026 15:01:20 +0200 Subject: [PATCH 3/3] ci: vitest --passWithNoTests (no test files exist yet) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8ddcde..ec31697 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,5 +30,5 @@ jobs: - run: pnpm install --frozen-lockfile - run: pnpm typecheck - - run: pnpm test + - run: pnpm test -- --passWithNoTests - run: pnpm build