chore(deps): update linters (v4) #2660
This file contains hidden or 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 Pull Requests with pkg.pr.new | |
| permissions: | |
| pull-requests: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| types: [opened, synchronize, labeled] | |
| jobs: | |
| publish: | |
| if: > | |
| github.repository == 'sanity-io/ui' && | |
| (github.event_name == 'push' || | |
| (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'trigger: preview'))) | |
| runs-on: ubuntu-latest | |
| env: | |
| TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }} | |
| TURBO_TEAM: ${{ vars.TURBO_TEAM }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| cache: pnpm | |
| node-version: lts/* | |
| - name: Install project dependencies | |
| run: pnpm install | |
| - id: pre-flight | |
| run: | | |
| VERSION="$(jq -r .version package.json)-pkg.pr.new@$(git rev-parse --short HEAD)" | |
| echo "version=${VERSION}" >> "$GITHUB_OUTPUT" | |
| - run: pnpm build | |
| env: | |
| PKG_VERSION: ${{ steps.pre-flight.outputs.version }} | |
| - run: | | |
| echo "Publishing to pkg.pr.new" | |
| pnpm pnpx pkg-pr-new publish |