-
Notifications
You must be signed in to change notification settings - Fork 12
44 lines (38 loc) · 1013 Bytes
/
npm-publish.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
39
40
41
42
43
44
name: Publish to Npm
on:
workflow_call:
workflow_dispatch:
push:
branches:
- main
jobs:
publish:
name: Publish to npm
runs-on: ubuntu-latest
permissions:
contents: write
defaults:
run:
working-directory: npm
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: pnpm/action-setup@v3
with:
version: 9
- name: Install dependencies
run: pnpm install
- name: Build
run: pnpm build
# If there are changesets, this action will create a PR on the repo to version packages
# If there are none, it will publish newer-versioned public packages to npm
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset:publish
cwd: "./npm"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}