diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..615de97 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: release to npm +on: + push: + branches: + - 'release/**' +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # to fetch git tags + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v1 + with: + node-version: '12.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install + - run: npm run build + - run: npm run lerna:publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index def1aaa..0000000 --- a/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: node_js - -node_js: - - "8" - - "10" - - "12" - -cache: npm - -install: - - npm install - -script: - - npm test - -before_deploy: - - echo "//registry.npmjs.org/:_authToken=\${NPM_TOKEN}" >> $HOME/.npmrc 2> /dev/null - -deploy: - provider: script - script: "npm run lerna:publish" - skip_cleanup: true - on: - node: "10" - all_branches: true - condition: ${TRAVIS_PULL_REQUEST_BRANCH:-$TRAVIS_BRANCH} =~ ^release\/.*$ diff --git a/packages/svrx-cli/bin/svrx.js b/packages/svrx-cli/bin/svrx.js index bc6be1c..f20b244 100755 --- a/packages/svrx-cli/bin/svrx.js +++ b/packages/svrx-cli/bin/svrx.js @@ -103,10 +103,10 @@ const commands = { }, }, remove: { - description: `Remove local packages of svrx core or plugins. eg: + description: `Remove local packages of svrx core or plugins. eg: svrx remove 1.0.0 (remove a core package) svrx remove webpack (remove a plugin) - svrx remove webpack/1.0.0 + svrx remove webpack/1.0.0 svrx remove ALL (to remove all packages of svrx core and plugins) svrx remove CORE (to remove all packages of svrx core) svrx remove PLUGIN (to remove all packages of svrx plugins)`, @@ -198,7 +198,6 @@ const help = async (cmd) => { process.exit(0); }; - if (options.h || options.help) { help(cmds.length > 0 ? cmds[0] : null); } else if (options.v || options.version) { diff --git a/packages/svrx-cli/package.json b/packages/svrx-cli/package.json index b7ba013..dc67e4a 100644 --- a/packages/svrx-cli/package.json +++ b/packages/svrx-cli/package.json @@ -19,7 +19,7 @@ "preuninstall": "node ./script/preuninstall.js" }, "dependencies": { - "@svrx/util": "^1.1.4", + "@svrx/util": "^1.1.6", "update-notifier": "^3.0.0", "yargs-parser": "^13.1.0" }, diff --git a/packages/svrx-cli/script/postinstall.js b/packages/svrx-cli/script/postinstall.js index acdc115..d0f277a 100644 --- a/packages/svrx-cli/script/postinstall.js +++ b/packages/svrx-cli/script/postinstall.js @@ -1,6 +1,5 @@ const { PackageManagerCreator, logger } = require('@svrx/util'); - const installSvrx = async () => { const spinner = logger.spin('Installing svrx core...'); try {