Skip to content

Commit

Permalink
fix: publish to gpr
Browse files Browse the repository at this point in the history
  • Loading branch information
selmi-karim committed May 30, 2020
1 parent 1ae1fab commit 033019e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 42 deletions.
42 changes: 0 additions & 42 deletions .github/workflows/build.yml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,20 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx -p @semantic-release/changelog -p @semantic-release/git -p semantic-release semantic-release
- name: Publish to GPR
env:
COMMIT_FILTER: "chore(release)"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
# Get last commit message
readonly local last_commit_log=$(git log -1 --pretty=format:"%s")
echo "last commit log: $last_commit_log"
readonly local filter_count=$(echo "$last_commit_log" | grep -c "$COMMIT_FILTER" )
echo "number of occurence of '$COMMIT_FILTER' in '$last_commit_log': $filter_count"
if [[ "$filter_count" -eq 0 ]]; then
echo "no need to publish new version to GPR"
else
echo "GPR should be updated"
npm publish
fi

0 comments on commit 033019e

Please sign in to comment.