Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,15 @@ jobs:

- name: Validate changesets
run: |
if [ -z "$(ls .changeset/*.md 2>/dev/null)" ]; then
# Check if .changeset directory exists and contains .md files
if [ ! -d .changeset ] || [ -z "$(find .changeset -name '*.md' -type f 2>/dev/null | head -1)" ]; then
echo "❌ No changesets found. Please create changesets locally with 'pnpm changeset' before releasing."
echo "Changesets should be created during development, not during release."
exit 1
else
echo "✅ Found $(ls .changeset/*.md | wc -l) changeset(s)"
echo "✅ Found $(find .changeset -name '*.md' -type f | wc -l) changeset(s)"
echo "Changesets:"
ls .changeset/*.md
find .changeset -name '*.md' -type f
fi

- name: Create Release Pull Request or Publish
Expand All @@ -100,13 +101,13 @@ jobs:
echo "🔍 This is a dry run. The following changes would be made:"
echo ""
echo "📋 Changeset contents:"
for file in .changeset/*.md; do
while IFS= read -r -d '' file; do
if [ -f "$file" ]; then
echo "--- $file ---"
cat "$file"
echo ""
fi
done
done < <(find .changeset -name '*.md' -type f -print0 2>/dev/null)

echo "📦 Version changes that would be applied:"
pnpm changeset version --dry-run
Expand Down
45 changes: 45 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand All @@ -31,12 +33,55 @@ jobs:
- name: Run format check
run: pnpm format

# Determine which packages have changed
- name: Determine changed packages
id: quality-changes
uses: dorny/paths-filter@v2
with:
filters: |
react:
- 'packages/react/**'
angular:
- 'packages/angular/**'

- name: Check for changesets
run: |
# Check if any packages have changed
packages_changed=$([[ "${{ steps.quality-changes.outputs.react }}" == "true" ]] || [[ "${{ steps.quality-changes.outputs.angular }}" == "true" ]])
if [[ "$packages_changed" == "true" ]]; then
# Check if .changeset directory exists and contains .md files
if [ ! -d .changeset ] || [ -z "$(find .changeset -name '*.md' -type f 2>/dev/null | head -1)" ]; then
echo "❌ Changes detected in packages but no changesets found."
echo ""
echo "Please create a changeset with 'pnpm changeset' for changes that should be released."
echo "If these changes don't need a release, please add a comment explaining why."
echo ""
echo "Changed packages:"
if [[ "${{ steps.quality-changes.outputs.react }}" == "true" ]]; then
echo "- React package"
fi
if [[ "${{ steps.quality-changes.outputs.angular }}" == "true" ]]; then
echo "- Angular package"
fi
exit 1
else
echo "✅ Found changesets for package changes"
echo ""
echo "Changesets:"
find .changeset -name '*.md' -type f
fi
else
echo "ℹ️ No package changes detected, skipping changeset check"
fi

test:
runs-on: ubuntu-latest
needs: quality
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
Loading