-
Notifications
You must be signed in to change notification settings - Fork 3
46 lines (37 loc) · 1022 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
45
46
name: npm-publish
# Controls when the workflow will run
on:
release:
types: [published]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18.13.0
registry-url: 'https://registry.npmjs.org'
- uses: pnpm/action-setup@v3
with:
version: 8
# Install dependencies
- name: Install dependencies
run: pnpm i
- name: Unit tests
run: |
cd packages/nice-form-react
pnpm test
- name: Build
run: |
cd packages/nice-form-react
pnpm build
- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd packages/nice-form-react
npm publish --access public