Skip to content

Commit

Permalink
feat: 新增github action
Browse files Browse the repository at this point in the history
  • Loading branch information
shinetingli committed Feb 14, 2023
1 parent 837d289 commit f4f983f
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Publish Package to npmjs

on:
push:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# Setup .npmrc file to publish to npm
- uses: actions/setup-node@v3
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-draggable-tree-next",
"version": "1.0.4",
"version": "1.0.5",
"description": "The json tree built based on vue3 supports node dragging, adding, editing and deleting, etc.",
"author": {
"name": "TingShine",
Expand Down
6 changes: 3 additions & 3 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ import vueJsx from "@vitejs/plugin-vue-jsx";
import svgLoader from "vite-svg-loader";
import { resolve } from "path";
import dts from "vite-plugin-dts";
import commonjs from 'rollup-plugin-commonjs';
import commonjs from "rollup-plugin-commonjs";

// https://vitejs.dev/config/
export default defineConfig({
plugins: [ vue(), vueJsx(), svgLoader(), dts()],
plugins: [vue(), vueJsx(), svgLoader(), dts()],
resolve: {
alias: {
"@": fileURLToPath(new URL("./packages", import.meta.url)),
Expand All @@ -21,7 +21,7 @@ export default defineConfig({
entry: resolve(__dirname, "packages/index.ts"),
formats: ["es", "umd"],
fileName: "index",
name: 'index',
name: "index",
},
copyPublicDir: false,
rollupOptions: {
Expand Down

0 comments on commit f4f983f

Please sign in to comment.