diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 000000000..1a21bfd07 --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,34 @@ +name: publish-npm + +on: + push: + tags: + - "v*" + +defaults: + run: + working-directory: ./js + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Use Node.js 14 + uses: actions/setup-node@v2 + with: + node-version: "14" + - name: Install Packages + run: yarn install --frozen-lockfile --non-interactive --no-progress + - name: Build + run: | + yarn run build:config + yarn run build + - name: Use GitHub npm registry + uses: actions/setup-node@v2 + with: + registry-url: "https://npm.pkg.github.com" + - name: Publish + run: yarn publish + env: + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}