diff --git a/.github/workflows/publish.yml b/.github/workflows/publish_github.yml similarity index 100% rename from .github/workflows/publish.yml rename to .github/workflows/publish_github.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e5ba0da985a868f193701f9befb6d091aadb2cf6..cf22a16d596ed7961efee1415326b48ea7dd5d40 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -25,7 +25,20 @@ jobs: - name: Install dependencies run: pnpm install - - name: Create Release Pull Request + - name: Add auth token to .npmrc file + run: | + cat << EOF >> ".npmrc" + //registry.npmjs.org/:_authToken=$NPM_TOKEN + EOF + env: + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Create Release Pull Request or Publish to npm + id: changesets uses: changesets/action@v1 + with: + # build package and call changeset publish + publish: pnpm release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }}