Skip to content

Commit

Permalink
Merge pull request #217 from Chuckame/fix-release
Browse files Browse the repository at this point in the history
feat: Allow generating a release on a non-main branch
  • Loading branch information
Chuckame authored May 29, 2024
2 parents 31306c1 + c36c443 commit 2040d25
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 2040d25

Please sign in to comment.