Skip to content

Commit

Permalink
Fail release build early
Browse files Browse the repository at this point in the history
  • Loading branch information
kaklakariada committed Sep 8, 2024
1 parent d51fe1d commit 0c310c6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,14 @@ jobs:
steps:
- name: Checkout the repository
uses: actions/checkout@v4

- name: Fail if not running on main branch
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/github-script@v7
with:
script: |
core.setFailed('Not running on main branch, github.ref is ${{ github.ref }}. Please start this workflow only on main')
- name: Set up Java
uses: actions/setup-java@v4
with:
Expand Down

0 comments on commit 0c310c6

Please sign in to comment.