diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7e7fb85 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,27 @@ +name: Publish Package to npmjs + +on: + release: + types: [ published ] + +jobs: + release: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + cache: npm + + - name: Install dependencies + run: npm ci + + - name: Publish Package to npmjs + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}