From 9958420b187bfaf67b2c9df258c05529685bae9c Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Mon, 2 Dec 2024 11:57:14 +0100 Subject: [PATCH] Use NPM & Version Tag for Publish --- .github/workflows/publish.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 450c502..4e93f8a 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -21,15 +21,16 @@ jobs: - name: Build run: bun run build - - - name: Configure NPM + + - name: Set Version from Tag run: | - cd packages/agent-sdk - echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc + VERSION=${GITHUB_REF#refs/tags/} + npm version $VERSION --no-git-tag-version + working-directory: packages/agent-sdk - - name: Publish to NPM + - name: Publish with npm run: | cd packages/agent-sdk - bun publish --no-git-checks + npm publish --access public env: - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} \ No newline at end of file