From 778d143db8d7b0aaba9a6cb09f08eb258770305f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karlo=20Ben=C4=8Di=C4=87?= Date: Fri, 11 Oct 2024 12:01:16 +0200 Subject: [PATCH] add npm registry publish --- .github/workflows/release.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 6bfa2a4..6afade7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,7 +34,8 @@ jobs: - name: Install Dependencies run: npm ci - - name: Create Release Pull Request or Publish to npm + - name: Create Release Pull Request and publish to GitHub Packages + id: changesets uses: changesets/action@v1 with: version: npm run version @@ -42,3 +43,10 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} NODE_AUTH_TOKEN: ${{ secrets.PACKAGES_TOKEN }} + + - name: Publish to npm registry + if: steps.changesets.outputs.hasChangesets == 'false' + run: npm publish --registry=https://registry.npmjs.org/ --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + \ No newline at end of file