Skip to content

stop running publish workflows in forks #121

stop running publish workflows in forks

stop running publish workflows in forks #121

name: 'Publish Snapshot Release'
on:
push:
branches:
- main
paths-ignore:
# - '.github/**'
- './package.json'
- './changeset/**/*'
- '/apps/**/*'
- '/internal/**/*'
- '/cypress/**/*'
- '**/*.test.ts'
- '**/*.test.tsx'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
publish-snapshot:
if: github.repository == 'radix-ui/primitives'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
run_install: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build packages
run: pnpm build
- name: Write .npmrc
run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
- name: Update snapshot version
run: pnpm run bump:next
- name: Publish snapshot
run: pnpm run release:next --no-git-checks