Skip to content

Commit

Permalink
Fix release so we can only push to mvn central from main
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza Jugon committed Oct 23, 2024
1 parent 76ef395 commit 9b34775
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ on:
description: "The branch to use to release from."
required: true
default: "main"

jobs:
release:
name: Release to Maven Central
runs-on: ubuntu-20.04

steps:
- name: Check if branch is main
if: github.event.inputs.branch != 'main'
run: |
echo "This workflow can only run from the 'main' branch."
exit 1
- name: Checkout source code
uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -47,4 +54,4 @@ jobs:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWORD }}
GPG_PASSPHRASE: ${{secrets.GPG_PRIVATE_KEY_PASSPHRASE}}
GPG_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}

0 comments on commit 9b34775

Please sign in to comment.