Skip to content

Publish PRs

Publish PRs #796

Workflow file for this run

name: Publish PRs
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
steps:
- name: Check out code
uses: actions/checkout@v2
with:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0
- uses: pnpm/action-setup@v2.2.2
with:
version: 7.4.0
- name: Setup Node.js environment
uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Print cwd
run: ls
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
- name: Build Types
run: pnpm types
- name: Set NPMRC
run: echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: View NPMRC
run: cat .npmrc
- name: Publish under PR tag
run: |
echo running on branch ${GITHUB_REF##*/}
pnpm version:snapshot
pnpm publish -r --tag ${GITHUB_REF##*/} --no-git-checks --access public
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}