Skip to content

chore: add npm authentication configuration to GitHub Actions workflow #10

chore: add npm authentication configuration to GitHub Actions workflow

chore: add npm authentication configuration to GitHub Actions workflow #10

Workflow file for this run

name: Release (Changesets)
on:
push:
branches: [main]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.CHANGESETS_TOKEN }}
- uses: pnpm/action-setup@v4
with: { version: 10 }
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm -r --filter @native-ui-org/primitives run build
- name: Configure npm auth
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Version or Publish
uses: changesets/action@v1
with:
version: pnpm changeset version
publish: pnpm changeset publish
createGithubReleases: true
env:
GITHUB_TOKEN: ${{ secrets.CHANGESETS_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}