Skip to content
Merged
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
13 changes: 12 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ jobs:
- name: Stop Nx Agents
if: ${{ always() }}
run: npx nx-cloud stop-all-agents
- name: Check for Changesets marked as major
id: major
run: |
echo "found=false" >> $GITHUB_OUTPUT
regex="(major)"
shopt -s nullglob
for file in .changeset/*.md; do
if [[ $(cat $file) =~ $regex ]]; then
echo "found=true" >> $GITHUB_OUTPUT
fi
done
- name: Run Changesets (version or publish)
id: changesets
uses: changesets/action@v1.5.3
Expand All @@ -49,7 +60,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Auto-merge Changesets PR
if: steps.changesets.outputs.hasChangesets == 'true'
if: steps.changesets.outputs.hasChangesets == 'true' && steps.major.outputs.found == 'false'
run: |
gh pr merge --squash "$PR_NUMBER"
gh api --method POST /repos/$REPO/dispatches -f 'event_type=release'
Expand Down
Loading