-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (37 loc) · 1.12 KB
/
ci.yml
File metadata and controls
39 lines (37 loc) · 1.12 KB
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
name: Node.js Package
on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0 # Get all history for version calculation
- uses: pnpm/action-setup@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
registry-url: 'https://registry.npmjs.org'
scope: '@dnvgl'
cache: 'pnpm'
- uses: gittools/actions/gitversion/setup@v4.5.0
with:
versionSpec: '6.7.x'
- uses: gittools/actions/gitversion/execute@v4.5.0
id: gitversion
- run: pnpm version ${{ steps.gitversion.outputs.semVer }} --no-git-tag-version
- run: pnpm install --frozen-lockfile
- run: pnpm build
- run: pnpm test -- --run
- run: pnpm exec playwright install --with-deps chromium
- run: pnpm e2e
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
run: pnpm publish --access public --no-git-checks