Skip to content

Commit e391a4a

Browse files
committed
build: update workflows
1 parent f637bdc commit e391a4a

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.github/workflows/nodejs.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
name: Node.js CI
66

7-
on: [push]
7+
on:
8+
push:
9+
pull_request:
10+
branches: [ master ]
811

912
jobs:
1013
build:

.github/workflows/publish.yml

+4-10
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,26 @@
1-
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
1+
# This workflow will do a clean install of node dependencies and publishes via npm
22
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
33

44
name: Node.js Publish CI
55

66
on:
7-
push:
8-
branches: [ master ]
97
pull_request:
8+
types: [ closed ]
109
branches: [ master ]
1110

1211
jobs:
1312
build:
14-
13+
if: github.event.pull_request.merged == true
1514
runs-on: ubuntu-latest
1615

17-
strategy:
18-
matrix:
19-
node-version: [16.x, 18.x, 20.x]
20-
2116
steps:
2217
- uses: actions/checkout@v4
2318
- name: Use Node.js ${{ matrix.node-version }}
2419
uses: actions/setup-node@v4
2520
with:
26-
node-version: ${{ matrix.node-version }}
21+
node-version: 20.x
2722
registry-url: 'https://registry.npmjs.org'
2823
- run: npm install
29-
- run: npm test
3024
env:
3125
CI: true
3226
- run: npm publish

0 commit comments

Comments
 (0)