Skip to content

Commit

Permalink
chore: add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
fy committed Jun 21, 2023
1 parent abec48b commit c2411e9
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 15 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: npm-publish

on:
workflow_dispatch:
push:
tags:
- "v*"

jobs:
build-publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3

- name: prepare nodejs
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: "https://registry.npmjs.org"

- name: prepare pnpm
uses: pnpm/action-setup@v2
with:
version: 8.6.2

- name: build
run: pnpm install --ignore-scripts && pnpm run build

- name: publish
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
6 changes: 2 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@
"lint:lint-staged": "lint-staged",
"lint:tsc": "tsc --noEmit"
},
"dependencies": {
"typescript": "^5.1.3",
"vite-tsconfig-paths": "^4.2.0"
},
"devDependencies": {
"@commitlint/cli": "^17.6.5",
"@commitlint/config-conventional": "^17.6.5",
Expand All @@ -50,6 +46,8 @@
"jsdom": "^22.1.0",
"lint-staged": "^13.2.2",
"prettier": "^2.8.8",
"typescript": "^5.1.3",
"vite-tsconfig-paths": "^4.2.0",
"vitest": "^0.32.2"
}
}
23 changes: 12 additions & 11 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 c2411e9

Please sign in to comment.