-
Notifications
You must be signed in to change notification settings - Fork 9
35 lines (31 loc) · 1.05 KB
/
preview-versions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
name: Preview versions
on:
workflow_dispatch:
push:
branches:
- changeset-release/main
jobs:
preview:
name: Preview 🔮
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ./.github/workflows/actions/prepare
# Changeset entries are consumed on this branch. We need to reset the
# changeset files so that the snapshot command knows the correct packages,
# and does not accidentally publish the new, non-preview version numbers
# prematurely.
- name: Reset changeset entries
run: |
git fetch origin main
git checkout origin/main -- .changeset
- uses: ./.github/workflows/actions/type-check-with-cache
- run: pnpm run build
- name: Deploy preview versions to NPM
run: |
pnpm changeset version --snapshot preview
pnpm changeset publish --tag preview --no-git-tag
env:
GITHUB_TOKEN: ${{ secrets.RELEASES_GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}