From 53ba00720927f691e0b66a501b369c0ca92f1761 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Thu, 9 Jan 2025 18:23:36 -0500 Subject: [PATCH] add workflow file contents --- .github/workflows/npm-publish.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index e69de29..4f05565 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,24 @@ +name: Publish Package to npmjs +on: + release: + types: + - created + workflow_dispatch: + +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' + - run: npm ci + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPMJS_TOKEN }} \ No newline at end of file