-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1009 Bytes
/
ci.yml
File metadata and controls
36 lines (34 loc) · 1009 Bytes
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
name: Node.js Package
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Get all history for version calculation
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v5
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
scope: '@dnvgl'
cache: 'pnpm'
- uses: gittools/actions/gitversion/setup@v0.9.7
with:
versionSpec: '5.x'
- uses: gittools/actions/gitversion/execute@v0.9.7
with:
useConfigFile: true
- run: pnpm version $GITVERSION_SEMVER --no-git-tag-version
- run: pnpm install --frozen-lockfile
- run: pnpm build
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: pnpm publish --access public --no-git-checks