-
Notifications
You must be signed in to change notification settings - Fork 40
43 lines (36 loc) · 1.22 KB
/
on-create-release.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
name: Publish to NPM
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18]
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
ref: 'main' # Ensure we're on the main branch
- name: Set up PNPM
uses: pnpm/action-setup@v2
with:
version: 8
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org'
# Navigate to the specific package directory within the monorepo
- name: Change to package directory
run: cd packages/sdk
# - name: Install dependencies
# run: pnpm install
- name: Clean install and build 🔧
run: cd packages/sdk && pnpm i --force --frozen-lockfile && pnpm build
# run: pnpm ci && pnpm build // pnpm ci not yet implemented: https://github.com/pnpm/pnpm/issues/6100
- name: Publish package on NPM 📦
run: cd packages/sdk && pnpm publish --publish-branch main --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}