-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (31 loc) · 929 Bytes
/
build.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: Build
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set Version
run: npm --no-git-tag-version version 3.0.${{ github.run_number }}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install
run: npm ci
- name: Generate
run: npm run generate
- name: Production Build
run: npm run build
- name: Authenticate with NPM registry
if: github.ref == 'refs/heads/main'
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > .npmrc
- name: Publish NPM package
if: github.ref == 'refs/heads/main'
run: npm publish --access public