Skip to content

Commit

Permalink
ci: improve release workflow with PR creation
Browse files Browse the repository at this point in the history
- Replace direct push to main with PR creation for new releases
- Update dev branch with new release changes
- Use GitHub CLI to automate PR creation process
- Enhance version control and review process for releases
  • Loading branch information
EvanNotFound committed Dec 2, 2024
1 parent de3ea1c commit cdecc01
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,18 @@ jobs:
git commit -m "chore: bump version to ${VERSION}"
fi
- name: Push changes
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
VERSION=$(node -p "require('./package.json').version")
BRANCH="release/v${VERSION}"
git checkout -b $BRANCH
git push -u origin $BRANCH
gh pr create --base main --head $BRANCH --title "Release v${VERSION}" --body "Automated release PR for version ${VERSION}"
- name: Update dev branch
run: |
git push --follow-tags origin main
git checkout dev
git merge main
git merge $BRANCH
git push origin dev

0 comments on commit cdecc01

Please sign in to comment.