diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..11c7ebf --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,24 @@ +name: Node.js Package +on: + release: + types: [created] + + workflow_dispatch: + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14.x + registry-url: https://registry.npmjs.org/ + cache: yarn + - run: yarn + - run: yarn lint + - run: yarn build + - run: yarn test + - run: yarn publish + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f70b4b8..05ac166 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} - cache: "yarn" + cache: yarn - run: yarn - run: yarn lint - run: yarn build