Skip to content

Commit

Permalink
chore: 🤖 TIAS changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
heldrida committed Aug 15, 2024
1 parent 745cd7f commit 076d700
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/changeset-version-management.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,13 @@ jobs:
run: |
# Default skip state
skip="false"
# Default main branch
defaultBranchName=$(git remote show origin | grep 'HEAD branch' | cut -d ' ' -f5)
# Changeset artifacts
changesetArtifactsPath=".changeset"
if ! pnpm exec changeset status &>/dev/null; then
echo "⚠️ Warning: No changesets found, should skip!"
skip="true"
fi
# Commit hash that triggered workflow
commitHash=${{ github.sha }}
# If there are changes, it exit 1
if git diff --quiet HEAD "$defaultBranchName" -- "$changesetArtifactsPath"; then
if git diff-tree --no-commit-id --name-only "$commitHash" | grep -q "$changesetArtifactsPath"; then
echo "⚠️ Warning: The .changeset directory doesn't have new changesets, should skip!"
skip="true"
fi
Expand Down

0 comments on commit 076d700

Please sign in to comment.