add git workflow

This commit is contained in:
Bruce Röttgers 2025-04-26 14:48:36 +02:00
parent 201387be5e
commit 4d25bc9e4c

26
.github/workflows/publish-types.yaml vendored Normal file
View File

@ -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 }}