diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6f19a00e..3fd4d6d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,8 +4,6 @@ name: Node.js CI on: - push: - branches: [ master ] pull_request: branches: [ master ] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..46a2859d --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,19 @@ +name: Node.js Package +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v2 + with: + node-version: '15.x' + registry-url: 'https://registry.npmjs.org' + always-auth: true + - run: yarn install + - run: yarn publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file