Skip to content

Commit 35e1510

Browse files
committed
Create npm-publish.yml
1 parent 1a2b5e6 commit 35e1510

File tree

3 files changed

+266
-10
lines changed

3 files changed

+266
-10
lines changed

.github/workflows/npm-publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Publish npm package
2+
3+
on:
4+
release:
5+
types: [created]
6+
workflow_dispatch:
7+
8+
env:
9+
rootDir: ./packages/nextjs-cache-handler
10+
11+
jobs:
12+
publish-npm:
13+
runs-on: ubuntu-latest
14+
15+
defaults:
16+
run:
17+
working-directory: ${{ env.rootDir }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: actions/setup-node@v4
21+
with:
22+
cache: npm
23+
node-version: lts/*
24+
cache-dependency-path: ${{ env.rootDir }}/package-lock.json
25+
registry-url: "https://registry.npmjs.org"
26+
- run: npm ci
27+
- run: npm publish --access public
28+
env:
29+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

packages/nextjs-cache-handler/package-lock.json

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

packages/nextjs-cache-handler/package.json

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,16 @@
44
"name": "Forte_ Digital",
55
"url": "https://fortedigital.com"
66
},
7-
"version": "1.0.0-alpha",
8-
"type": "module",
9-
"license": "MIT",
10-
"description": "Next.js cache handlers",
11-
"homepage": "TODO",
12-
"bugs": "TODO",
7+
"homepage": "https://github.com/fortedigital/nextjs-cache-handler",
8+
"bugs": "https://github.com/fortedigital/nextjs-cache-handler/issues",
139
"repository": {
1410
"type": "git",
15-
"url": "TODO"
11+
"url": "git+https://github.com/fortedigital/nextjs-cache-handler.git"
1612
},
13+
"version": "1.0.0",
14+
"type": "module",
15+
"license": "MIT",
16+
"description": "Next.js cache handlers",
1717
"exports": {
1818
"./*": {
1919
"require": "./dist/*.cjs",
@@ -67,5 +67,8 @@
6767
"distTags": [
6868
"next13.5",
6969
"next14"
70-
]
70+
],
71+
"optionalDependencies": {
72+
"@rollup/rollup-linux-x64-gnu": "^4.24.0"
73+
}
7174
}

0 commit comments

Comments
 (0)