38 lines
856 B
1
name: Publish types on npm
2
on: workflow_dispatch
3
4
permissions:
5
contents: read
6
pages: write
7
id-token: write
8
9
jobs:
10
types:
11
name: Publish types on npm
12
runs-on: ubuntu-latest
13
steps:
14
- uses: actions/checkout@v3
15
16
- uses: pnpm/action-setup@v2
17
with:
18
version: 9
19
run_install: false
20
- uses: actions/setup-node@v3
21
with:
22
node-version: 18
23
cache: pnpm
24
registry-url: https://registry.npmjs.org
25
26
- name: Install dependencies
27
run: pnpm install --frozen-lockfile
28
- name: Build moonlight
29
env:
30
NODE_ENV: production
31
run: pnpm run build
32
33
- name: Publish types
34
run: |
35
cd packages/types
36
pnpm publish --access public --no-git-checks
37
env:
38
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
39