-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
publish.yml: don't crash when there are change files
- Loading branch information
1 parent
c2e8bf4
commit b8951c9
Showing
1 changed file
with
10 additions
and
7 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 |
---|---|---|
|
@@ -59,19 +59,22 @@ jobs: | |
mkdir artifacts | ||
cp *.node artifacts | ||
yarn artifacts | ||
- name: check changes | ||
- name: Check changes | ||
id: check_changes | ||
run: | | ||
git remote set-url origin https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY.git | ||
# Generate changes from beachball, including package.json version bump | ||
yarn beachball bump | ||
# Check if that contains changefiles | ||
git diff --exit-code -- ./change | ||
echo "OUTPUT_STATUS=$?" >> "$GITHUB_OUTPUT" | ||
if yarn beachball bump | grep "Removing change files:"; then | ||
echo "changes!" | ||
echo "HAS_CHANGES=true" >> "$GITHUB_OUTPUT" | ||
else | ||
echo "no changes!" | ||
echo "HAS_CHANGES=false" >> "$GITHUB_OUTPUT" | ||
fi | ||
shell: bash | ||
- name: Publish | ||
if: ${{ steps.check_changes.outputs.OUTPUT_STATUS == 1 }} | ||
if: ${{ steps.check_changes.outputs.HAS_CHANGES == 'true' }} | ||
run: | | ||
git config user.email "[email protected]" | ||
git config user.name "$GITHUB_ACTOR" | ||
|