Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18
registry-url: 'https://registry.npmjs.org'

- name: Setup pnpm
uses: pnpm/action-setup@v2
Expand All @@ -52,8 +53,23 @@ jobs:
run: pnpm build

- name: Setup NPM authentication
run: |
echo "Checking NPM_TOKEN..."
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
echo "❌ NPM_TOKEN is empty or not set!"
exit 1
else
echo "✅ NPM_TOKEN is set"
fi
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
echo "Created ~/.npmrc file"
ls -la ~/.npmrc
echo "Testing npm authentication..."
npm whoami || echo "npm whoami failed"

run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc


- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
Expand All @@ -63,9 +79,11 @@ jobs:
title: 'chore: release packages'
commit: 'chore: release packages'
createGithubReleases: true
setupGitUser: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Create GitHub Release
if: steps.changesets.outputs.published == 'true'
Expand Down