Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadi Abu Hilal authored and Shadi Abu Hilal committed Oct 24, 2023
1 parent 6f33d81 commit c505513
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/master-workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ jobs:
strategy:
fail-fast: false
matrix:
# pull_request
if: ${{ github.event_name == 'pull_request' && github.ref != 'refs/heads/master' }}
node-version: [16.x, 18.x, 20.x]
# push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
Expand All @@ -34,8 +39,8 @@ jobs:
- name: Test
run: npm test
- name: Release
# Check if it's on master branch, then push
if: ${{ github.ref == 'refs/heads/branch' }}
# push
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPMJS_ACCESS_TOKEN }}
Expand Down

0 comments on commit c505513

Please sign in to comment.