File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change 7777 # Push the branch
7878 git push origin $BRANCH_NAME
7979
80+ # Check if a release PR already exists
81+ if gh pr list --state open --head $BRANCH_NAME --json number | grep -q "number"; then
82+ echo "Release PR already exists for this branch, skipping creation"
83+ exit 0
84+ fi
85+
8086 # Create PR using GitHub CLI
81- PR_URL=$( gh pr create \
87+ gh pr create \
8288 --title "v${NEW_VERSION} Update CHANGELOG and Version" \
8389 --body "This PR prepares a new frontend release based on recent changes.
8490
9197 2. Merge this PR to trigger the release
9298 3. The release will be automatically created with a GitHub tag" \
9399 --base main \
94- --head $BRANCH_NAME)
100+ --head $BRANCH_NAME
95101 env :
96102 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 1616 "lint" : " eslint" ,
1717 "lint:fix" : " eslint --fix" ,
1818 "changelog" : " changelogen --from HEAD~10 --to HEAD --output CHANGELOG.md" ,
19- "release:prepare" : " changelogen --bump --no-commit --no-tag" ,
19+ "release:prepare" : " changelogen --from $(git describe --tags --abbrev=0 2>/dev/null || git rev-list --max-parents=0 HEAD) -- bump --no-commit --no-tag" ,
2020 "release:create" : " changelogen --release --push"
2121 },
2222 "dependencies" : {
You can’t perform that action at this time.
0 commit comments