diff --git a/.github/workflows/npm-release.yaml b/.github/workflows/npm-release.yaml new file mode 100644 index 0000000..ef8eff1 --- /dev/null +++ b/.github/workflows/npm-release.yaml @@ -0,0 +1,25 @@ +name: Publish Package to npmjs +on: + release: + types: [published] + +jobs: + build-release: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + cache: 'yarn' + + - name: Yarn Install + run: yarn install --frozen-lockfile + + - name: Yarn Build + run: yarn run build + + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}