Skip to content

fix: update npm registry URL for pnstack in CI workflow and .npmrc #3

fix: update npm registry URL for pnstack in CI workflow and .npmrc

fix: update npm registry URL for pnstack in CI workflow and .npmrc #3

Workflow file for this run

name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "@pnstack"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
publish:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v2
with:
version: 9
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
cache: "pnpm"
registry-url: "https://npm.pkg.github.com"
scope: "@pnstack"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm build
- name: Configure Git
run: |
git config --global user.name "GitHub Actions Bot"
git config --global user.email "[email protected]"
- name: Publish to GitHub Packages
run: pnpm -r publish --no-git-checks --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_CONFIG_REGISTRY: "https://npm.pkg.github.com/pnstack"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}