diff --git a/.github/workflows/publish-types.yaml b/.github/workflows/publish-types.yaml new file mode 100644 index 0000000..55789eb --- /dev/null +++ b/.github/workflows/publish-types.yaml @@ -0,0 +1,26 @@ +# Example from https://docs.github.com/en/actions/use-cases-and-examples/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry + +name: Publish Types Package to npmjs + +on: + push: + tags: + - "types/*" + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v4 + # Setup .npmrc file to publish to npm + - uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + # no npm ci as no dependencies exist + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}