Skip to content

Commit

Permalink
added check for final release
Browse files Browse the repository at this point in the history
Signed-off-by: munishchouhan <[email protected]>
  • Loading branch information
munishchouhan committed Oct 15, 2024
1 parent 699819a commit 09414cd
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,23 @@ jobs:
echo "VERSION=$VERSION"
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Enable Homebrew for final release
run: |
VERSION=${{ steps.version.outputs.VERSION }}
if [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
echo "Homebrew release enabled."
echo "JRELEASER_PACKAGERS_BREW_ACTIVE=ALWAYS" >> $GITHUB_ENV
else
echo "Homebrew release disabled (pre-release detected)."
echo "JRELEASER_PACKAGERS_BREW_ACTIVE=NEVER" >> $GITHUB_ENV
fi
- name: Run JReleaser
uses: jreleaser/release-action@v2
env:
JRELEASER_GITHUB_TOKEN: ${{ secrets.JRELEASER_GITHUB_TOKEN }}
JRELEASER_PROJECT_VERSION: ${{ steps.version.outputs.VERSION }}
JRELEASER_PACKAGERS_BREW_ACTIVE: ${{ env.JRELEASER_PACKAGERS_BREW_ACTIVE }}

- name: JReleaser release output
if: always()
Expand Down
1 change: 0 additions & 1 deletion jreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ distributions:

packagers:
brew:
active: ALWAYS
continueOnError: false
multiPlatform: true
repository:
Expand Down

0 comments on commit 09414cd

Please sign in to comment.