Repository navigation
Release v0.6.0 #7
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: Release source | |
| # `main` is the release branch: it receives merges from `dev` and nothing | |
| # else. Branch protection matches on the base branch only and cannot constrain | |
| # which branch a pull request comes from, so this check does it. | |
| on: | |
| pull_request: | |
| branches: [main] | |
| permissions: {} | |
| jobs: | |
| from-dev: | |
| name: from-dev | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Head branch must be dev | |
| env: | |
| HEAD_REF: ${{ github.head_ref }} | |
| run: | | |
| if [ "$HEAD_REF" != "dev" ]; then | |
| echo "::error::Pull requests into main must come from dev. This one comes from '$HEAD_REF'. Merge the work into dev first, then release dev into main." | |
| exit 1 | |
| fi | |
| echo "Head branch is dev." |