diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..852701b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Release + +on: + workflow_dispatch: + inputs: + git_tag: + description: 'Git tag to publish a release for (eg. v0.0.0)' + required: true + +permissions: + id-token: write # Required for OIDC + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + ref: '${{ github.event.inputs.git_tag }}' + + - uses: actions/setup-node@v4 + with: + node-version: '24' + registry-url: 'https://registry.npmjs.org' + + # Required to resolve an issue with publishing provenance + - name: Update npm + run: npm install -g npm@latest + + - name: Publish to NPM + run: | + make ci + echo "" + echo "Publishing" + npm publish --no-provenance + # Note: Do NOT set NODE_AUTH_TOKEN!