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
50 changes: 50 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Publish

on:
push:
tags:
- "v*"

jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest

permissions:
contents: read

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: "https://registry.npmjs.org"
cache: npm

- name: Install dependencies
run: npm ci

- name: Lint
run: npm run lint

- name: Format check
run: npm run format:check

- name: Typecheck
run: npm run typecheck

- name: Test
run: npm test -- --run

- name: Build
run: npm run build

- name: Publish
run: |
TAG=$(node -p "require('./package.json').version.includes('alpha') ? 'alpha' : 'latest'")
npm publish --tag $TAG --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "deadlinekit",
"version": "0.1.0",
"description": "Open-source SDK for request deadlines, latency budgets, cancellation, and graceful degradation in backend systems.",
"version": "0.1.0-alpha.1",
"description": "A small TypeScript utility for request deadlines, operation timeouts, AbortSignal cancellation, fallbacks, and observability in Node.js services.",
"type": "module",
"main": "./dist/index.cjs",
"module": "./dist/index.js",
Expand All @@ -14,7 +14,9 @@
}
},
"files": [
"dist"
"dist",
"README.md",
"LICENSE"
],
"scripts": {
"build": "tsup src/index.ts --format esm,cjs --dts",
Expand All @@ -38,6 +40,9 @@
"latency",
"timeout",
"cancellation",
"abortsignal",
"fallback",
"observability",
"backend",
"sdk",
"typescript",
Expand All @@ -60,4 +65,4 @@
"typescript-eslint": "^8.61.1",
"vitest": "^4.1.9"
}
}
}
Loading