chore(release): v1.3.0 official release #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR Check | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| validate-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check source branch | |
| run: | | |
| SOURCE_BRANCH="${{ github.head_ref }}" | |
| echo "Source branch: $SOURCE_BRANCH" | |
| echo "Target branch: ${{ github.base_ref }}" | |
| if [ "$SOURCE_BRANCH" != "dev" ]; then | |
| echo "::error::PRs to main branch are only allowed from dev branch." | |
| echo "::error::Current source branch: $SOURCE_BRANCH" | |
| echo "" | |
| echo "Please follow the branching strategy:" | |
| echo " 1. Create feature branches from dev" | |
| echo " 2. Merge feature branches into dev" | |
| echo " 3. Only merge dev into main for releases" | |
| exit 1 | |
| fi | |
| echo "✓ Valid PR: dev -> main" |