Publish PR build #39
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish PR build | |
on: | |
workflow_dispatch: | |
permissions: | |
actions: read | |
checks: write | |
contents: read | |
deployments: write | |
id-token: write | |
issues: write | |
statuses: write | |
pull-requests: write | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
environment: npm | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: PNPM setup | |
uses: ./.github/actions/pnpm-setup | |
- name: Build monorepo | |
run: pnpm build | |
- run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | |
- name: Publish PR version | |
run: pnpm pr-shipit | |
- name: Comment PR | |
run: pnpm tsx ./.github/helpers/src/publish-comment.ts comment --token ${{github.token}} |