Skip to content

Commit

Permalink
feat: Allow generating a release on a non-main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuckame committed May 29, 2024
1 parent 31306c1 commit c36c443
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Fail if branch is not main
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/main-v2'
run: |
echo "This workflow should only be triggered on main and main-v2 branch.
exit 1
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup Gradle
Expand All @@ -25,7 +30,7 @@ jobs:
ORG_GRADLE_PROJECT_signingKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingPassword: ${{ secrets.SIGNING_PASSWORD }}
- name: create release
run: gh release create "v${RELEASE_VERSION}" --generate-notes
run: gh release create "v${RELEASE_VERSION}" --generate-notes --target "${GITHUB_REF}"
env:
RELEASE_VERSION: ${{ github.event.inputs.version }}
GH_TOKEN: ${{ github.token }}

0 comments on commit c36c443

Please sign in to comment.