Skip to content

Commit

Permalink
[fix] NPM publishing by upgrading Node.js to 20.x
Browse files Browse the repository at this point in the history
  • Loading branch information
TechQuery committed Aug 24, 2024
1 parent d475b5b commit 91d8e88
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 24 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,29 @@ jobs:
contents: write
id-token: write
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
node-version: 20
registry-url: https://registry.npmjs.org
cache: pnpm
- name: Install Dependencies
run: pnpm i --frozen-lockfile

- name: Inject Environment variables
run: echo "${{ secrets.ENV_FILE }}" > .env

- name: Build & Publish
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Update document
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
publish_dir: ./docs
personal_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
test/
.env
docs/
.editorconfig
.vscode/
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"type": "module",
"main": "dist/index.js",
"engines": {
"node": ">=18"
"node": ">=20"
},
"dependencies": {
"@types/express": "^4.17.21",
Expand Down Expand Up @@ -51,7 +51,7 @@
"@octokit/openapi-types": "^22.2.0",
"@tsconfig/node18": "^18.2.4",
"@types/eventsource": "^1.1.15",
"@types/node": "^18.19.45",
"@types/node": "^20.16.1",
"eventsource": "^2.0.2",
"husky": "^9.1.5",
"koa": "^2.15.3",
Expand Down
34 changes: 17 additions & 17 deletions pnpm-lock.yaml

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

0 comments on commit 91d8e88

Please sign in to comment.