diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67489c07..c25bec44 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,21 +5,27 @@ name: Node.js CI on: push: - branches: [ master ] - tags: [v*] + branches: + - master + - release-* + tags: + - v* pull_request: - branches: [ master ] + branches: + - master + - release-* jobs: build: runs-on: ubuntu-latest - + env: + NODE_VER: 10 steps: - uses: actions/checkout@v2 - name: Use Node.js uses: actions/setup-node@v1 with: - node-version: 10 + node-version: ${{ env.NODE_VER }} - run: npm ci env: @@ -31,16 +37,16 @@ jobs: - name: Is Release? if: startswith(github.ref, 'refs/tags/v') - run: echo "##[set-env name=DEPLOY_PACKAGE;]true" + run: echo "::set-env name=DEPLOY_PACKAGE::true" - name: Publish to npm if: env.DEPLOY_PACKAGE == 'true' - run: npm set registry https://registry.npmjs.org/ && npm publish + run: npm set registry https://registry.npmjs.org/ && npm publish --access public env: - NODE_AUTH_TOKEN: ${{secrets.npm_token}} + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - name: Publish to github if: env.DEPLOY_PACKAGE == 'true' run: npm set registry https://npm.pkg.github.com/ && npm publish env: - NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} + NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}