Skip to content

Commit

Permalink
Update npm-publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ucatbas authored Jul 29, 2024
1 parent 222c5f6 commit 87e9c4b
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,6 @@ on:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
- run: npm test

update-package-json:
needs: build
runs-on: ubuntu-latest
Expand Down Expand Up @@ -48,7 +33,20 @@ jobs:
- run: |
echo "Name and version from package.json:"
cat package.json | jq '.name, .version'
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 16
- run: |
if [ -f package-lock.json ]; then
npm ci
else
npm install
fi
- run: npm test
publish-npm:
needs: update-package-json
runs-on: ubuntu-latest
Expand Down

0 comments on commit 87e9c4b

Please sign in to comment.