-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix service publish running when there's nothing to publish
- Loading branch information
Showing
1 changed file
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ jobs: | |
|
||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: 2 | ||
- name: Setup Node.js environment | ||
uses: actions/[email protected] | ||
with: | ||
|
@@ -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 }} |