Skip to content

Commit

Permalink
feat: run release it for by grepped history
Browse files Browse the repository at this point in the history
  • Loading branch information
splincode committed Oct 1, 2024
1 parent 67036dc commit e71deac
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions actions/run/release-it/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,23 @@ runs:

- shell: bash
run: |
export GITHUB_TOKEN="${{ inputs.githubToken }}"
export HISTORY="$(git log $(git describe --tags --abbrev=0)..@ --no-merges --oneline --grep='^feat' --grep='^fix' --grep='^refactor' --grep='^deprecate')"
if [[ "${{ inputs.mode }}" == "" ]]; then
if [[ "$HISTORY" == "" ]]; then
echo "Nothing found for release..."
exit 0;
else
echo "History found: \n"
printf '%s\n' "$HISTORY"
echo "\n\n"
fi;
fi;
if [[ "${{ inputs.mode }}" == "alpha" || "${{ inputs.mode }}" == "prerelease" ]]; then
npx release-it --preRelease=alpha --ci ${{ inputs.flags }}
npx release-it --preRelease=alpha --ci ${{ inputs.flags }}
else
npx release-it ${{ inputs.mode }} --ci ${{ inputs.flags }}
npx release-it ${{ inputs.mode }} --ci ${{ inputs.flags }}
fi

0 comments on commit e71deac

Please sign in to comment.