diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml deleted file mode 100644 index 26e4038..0000000 --- a/.github/workflows/npm-publish.yml +++ /dev/null @@ -1,27 +0,0 @@ -# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created -# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages - -name: Node.js Package - -on: - pull_request: - branches: [master] - types: - - closed -jobs: - publish-npm: - if: github.event.pull_request.merged == true - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-node@v3 - with: - node-version: 16 - registry-url: https://registry.npmjs.org/ - - run: npm i --legacy-peer-deps - - run: npm run build:lib - - run: npm publish --access=public - env: - NODE_AUTH_TOKEN: ${{secrets.KNE_PACKAGE_PUBLISH}} - - run: npm i -g cnpm - - run: cnpm sync @kne/example-driver diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..0747612 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,14 @@ +name: Publish Npm Package +on: + pull_request: + branches: [ master ] + types: + - closed +jobs: + libs-npm: + if: github.event.pull_request.merged == true + uses: kne-union/actions/.github/workflows/publish-libs-workflow.yml@master + secrets: inherit + with: + package_name: '@kne/example-driver' + example_package_name: '@kne-components/example-driver' diff --git a/package.json b/package.json index ffd528c..03223c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kne/example-driver", - "version": "0.1.13", + "version": "0.1.14", "description": "用于在线展示和编辑React组件", "syntax": { "esmodules": true