Skip to content

Commit

Permalink
refactor gitflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lucmkz committed Oct 5, 2023
1 parent cb7eb36 commit b29945a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .github/worflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
name: Node.js CI
name: CI

on:
push:
branches: [ "master", "master-v2" ]
branches: [ "master" ]
pull_request:
branches: [ "*" ]
branches: [ "master" ]

jobs:
build:

test:
name: Test on Node v${{ matrix.node-version }}
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [12.x, 14.x, 16.x, 18.x]
node-version: [12.x, 14.x, 16.x, 18.x, 19.x]

steps:
- uses: actions/checkout@v3
Expand All @@ -22,5 +22,5 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm test
18 changes: 4 additions & 14 deletions .github/worflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@
name: Node.js Publish Package
name: Publish to NPM

on:
release:
types: [created]

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: npm ci
- run: npm test

publish-npm:
needs: build
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- run: npm ci
- run: npm ci --legacy-peer-deps
- run: npm run build
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 comments on commit b29945a

Please sign in to comment.