-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (39 loc) · 1.05 KB
/
package-deploy-npm.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
47
48
49
50
51
name: 'Package & Deploy to NPM '
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: corepack enable
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Set up Git user
run: |
git config --global user.email "admin@threenineco.uk"
git config --global user.name "threenine"
- name: Release
run: pnpm standard-version
env:
GITHUB_TOKEN: ${{ github.token }}
- name: Build project
run: pnpm run build
- name: npm Login
run: npm login --auth-type npm --token ${{ secrets.NPM_TOKEN }}
- name: Publish to NPM
run: pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}