From eb31509573b8872a1ca6f8d202fe23dd63ef8913 Mon Sep 17 00:00:00 2001 From: Alex Stephen Date: Sat, 4 Apr 2026 18:26:00 -0700 Subject: [PATCH] Add NPM publishing workflow --- .github/workflows/npm_publish.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/npm_publish.yaml diff --git a/.github/workflows/npm_publish.yaml b/.github/workflows/npm_publish.yaml new file mode 100644 index 0000000..8774309 --- /dev/null +++ b/.github/workflows/npm_publish.yaml @@ -0,0 +1,29 @@ +name: Publish Package + +on: + push: + tags: + - "v*" + +permissions: + id-token: write # Required for OIDC + contents: read + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: "20" + registry-url: "https://registry.npmjs.org" + + # Ensure npm 11.5.1 or later is installed + - name: Update npm + run: npm install -g npm@latest + - run: npm ci + - run: npm run build --if-present + - run: npm test + - run: npm publish