Skip to content

Commit

Permalink
Fix service publish running when there's nothing to publish
Browse files Browse the repository at this point in the history
  • Loading branch information
juhenius committed Sep 27, 2023
1 parent 092fdfd commit eca174b
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ jobs:

steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- name: Setup Node.js environment
uses: actions/[email protected]
with:
Expand All @@ -40,7 +42,16 @@ jobs:
run: npm ci
- name: Build sources
run: npm -w src/service run build
- name: Check for changes in service directory
id: check-changes
run: |
if git diff --quiet HEAD^ HEAD -- ./src/service/; then
echo "::set-output name=changed::false"
else
echo "::set-output name=changed::true"
fi
- name: Publish package
if: steps.check-changes.outputs.changed == 'true'
run: npm -w src/service publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit eca174b

Please sign in to comment.