diff --git a/.github/workflows/publishing.yml b/.github/workflows/publishing.yml new file mode 100644 index 00000000..9c97aa14 --- /dev/null +++ b/.github/workflows/publishing.yml @@ -0,0 +1,31 @@ +name: Publish +on: + release: + types: [ published ] + +jobs: + publish: + name: Publish latest release + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + strategy: + matrix: + node: [22.x] + steps: + - uses: actions/checkout@v5 + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v5 + with: + node-version: ${{ matrix.node-version }} + cache: npm + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies + run: npm ci + - name: Build package + run: npm run build + - name: Publish package + run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}