Skip to content

Commit

Permalink
build: update workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
yinzara committed Mar 14, 2024
1 parent f637bdc commit e391a4a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@

name: Node.js CI

on: [push]
on:
push:
pull_request:
branches: [ master ]

jobs:
build:
Expand Down
14 changes: 4 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,26 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# This workflow will do a clean install of node dependencies and publishes via npm
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js Publish CI

on:
push:
branches: [ master ]
pull_request:
types: [ closed ]
branches: [ master ]

jobs:
build:

if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]

steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
node-version: 20.x
registry-url: 'https://registry.npmjs.org'
- run: npm install
- run: npm test
env:
CI: true
- run: npm publish
Expand Down

0 comments on commit e391a4a

Please sign in to comment.