-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (37 loc) · 1016 Bytes
/
pnpm.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
name: NodeJS with Webpack
on:
push:
branches: [ "main" ]
tags:
- "[0-9]+.[0-9]+.[0-9]+"
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.10.0]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org/"
always-auth: true
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install --no-frozen-lockfile # Do not need a lock file for this library
- name: Build library
run: pnpm build
- name: Publish to npm
if: startsWith(github.ref, 'refs/tags/') # Runs only when a tag is pushed
run: |
pnpm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}