Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
34 changes: 34 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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 typecheck
- run: pnpm test -- --passWithNoTests
- run: pnpm build
27 changes: 27 additions & 0 deletions .github/workflows/owner-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -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
}
44 changes: 44 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
Loading