Skip to content

Commit 34ddee2

Browse files
authored
Merge pull request #110 from nishant-labs/feat/publish-jsr
Feat/publish jsr
2 parents 4a29052 + 8bb072c commit 34ddee2

File tree

8 files changed

+53
-10
lines changed

8 files changed

+53
-10
lines changed

.github/workflows/jsr-publish.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Publish node-rest-server Package
5+
6+
on:
7+
release:
8+
types: [published]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: actions/setup-node@v4
16+
with:
17+
node-version: 22
18+
- run: npm ci
19+
- run: npm run build
20+
- run: npm run lint
21+
- run: npm run format
22+
- run: npm test
23+
24+
publish-jsr:
25+
runs-on: ubuntu-latest
26+
permissions:
27+
contents: read
28+
id-token: write
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: Publish package
32+
run: npx jsr publish

.github/workflows/npm-publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 20
17+
node-version: 22
1818
- run: npm ci
1919
- run: npm run build
2020
- run: npm run lint
2121
- run: npm run format
22-
#- run: npm test
22+
- run: npm test
2323

2424
publish-npm:
2525
needs: build
@@ -28,7 +28,7 @@ jobs:
2828
- uses: actions/checkout@v4
2929
- uses: actions/setup-node@v4
3030
with:
31-
node-version: 20
31+
node-version: 22
3232
registry-url: https://registry.npmjs.org/
3333
- run: npm ci
3434
- run: npm run build
@@ -46,7 +46,7 @@ jobs:
4646
- uses: actions/checkout@v4
4747
- uses: actions/setup-node@v4
4848
with:
49-
node-version: 20
49+
node-version: 22
5050
registry-url: 'https://npm.pkg.github.com'
5151
- uses: jaywcjlove/github-action-package@main
5252
with:

.github/workflows/pr-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
- uses: actions/checkout@v4
1515
- uses: actions/setup-node@v4
1616
with:
17-
node-version: 20
17+
node-version: 22
1818
- run: npm ci
1919
- run: npm run build
2020
- run: npm run lint

jsr.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"name": "@nishant-labs/node-rest-server",
3+
"version": "4.3.0",
4+
"exports": "./mod.ts"
5+
}

mod.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export * from './src/index';

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "node-rest-server",
3-
"version": "4.2.0",
3+
"version": "4.3.0",
44
"description": "Configurable node rest server",
55
"exports": {
66
".": "./lib/index.mjs",

tsconfig.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
{
22
"extends": "./tsconfig.build.json",
3-
"include": ["src", "examples", "dev"],
4-
}
3+
"include": [
4+
"src",
5+
"examples",
6+
"dev",
7+
"mod.ts"
8+
],
9+
}

0 commit comments

Comments
 (0)