From 6ebb43c3da1993527d69cc45d2505252fe5cf901 Mon Sep 17 00:00:00 2001 From: Daniel Mohns Date: Thu, 22 Aug 2024 12:25:30 +0200 Subject: [PATCH] Add Release Workflow --- .github/workflows/release-publish-npm.yaml | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release-publish-npm.yaml diff --git a/.github/workflows/release-publish-npm.yaml b/.github/workflows/release-publish-npm.yaml new file mode 100644 index 0000000..989426b --- /dev/null +++ b/.github/workflows/release-publish-npm.yaml @@ -0,0 +1,29 @@ +name: Publish to NPM (test) + +on: + release: + types: + - published + workflow_dispatch: + +jobs: + run: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: "20.x" + registry-url: "https://registry.npmjs.org" + + - run: npm ci + + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}