-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (32 loc) · 1.23 KB
/
publish-snapshot.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
36
37
38
name: Publish snapshot
on:
workflow_dispatch:
jobs:
build_packages:
name: "Build and publish"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install
uses: ./.github/actions/install
# Bumps versions in package.json (see https://github.com/changesets/changesets/blob/main/docs/snapshot-releases.md)
# The changes should not be committed to any branch: the "releases" are not part of the version history.
- name: Version packages
run: pnpm changeset version --snapshot dev
# Note: must happen after versioning because the updated package.json files will be copied into dist/
- name: Build packages
run: pnpm build-packages
- name: Publish packages
run: |
echo "Published packages" >> publish.log
echo "==================" >> publish.log
echo "" >> publish.log
# Stdout of publish contains the published package names and versions
pnpm publish -r --access public --tag dev --no-git-checks | tee -a publish.log
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: List packages
run:
cat publish.log