Skip to content

increase version

increase version #126

Workflow file for this run

name: Gradle Build
on: [ push, pull_request ]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ macos-12, ubuntu-22.04, windows-2022 ]
java: [ '17' ]
fail-fast: false
name: ${{ matrix.os }}
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Set up Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: ${{ matrix.java }}
java-package: jdk+fx
cache: 'gradle'
- name: Echo JAVA_HOME
run: echo $JAVA_HOME
- name: Verify Gradle Wrapper
uses: gradle/wrapper-validation-action@v1
- name: Execute build (macOS & Ubuntu)
if: matrix.os != 'windows-2022'
run: ./gradlew --info build
- name: Execute build (Windows)
if: matrix.os == 'windows-2022'
run: .\gradlew.bat --info build
- name: Upload TAR as an artifact
if: matrix.os != 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-tar
path: build/distributions/*.tar
- name: Upload ZIP as an artifact
if: matrix.os == 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-zip
path: build/distributions/*.zip
- name: Execute runtime (macOS & Ubuntu)
if: matrix.os != 'windows-2022'
run: ./gradlew --info runtime
- name: Execute runtime (Windows)
if: matrix.os == 'windows-2022'
run: .\gradlew.bat --info runtime
- name: Execute jpackage (macOS & Ubuntu)
if: matrix.os != 'windows-2022'
run: ./gradlew --info jpackage
- name: Execute jpackage (Windows)
if: matrix.os == 'windows-2022'
run: .\gradlew.bat --info jpackage
- name: Upload DMG as an artifact
if: matrix.os == 'macos-12'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-dmg
path: build/jpackage/*.dmg
- name: Upload PKG as an artifact
if: matrix.os == 'macos-12'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-pkg
path: build/jpackage/*.pkg
- name: Upload DEB as an artifact
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-deb
path: build/jpackage/*.deb
- name: Upload RPM as an artifact
if: matrix.os == 'ubuntu-22.04'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-rpm
path: build/jpackage/*.rpm
- name: Upload EXE as an artifact
if: matrix.os == 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-exe
path: build/jpackage/*.exe
- name: Upload MSI as an artifact
if: matrix.os == 'windows-2022'
uses: actions/upload-artifact@v3
with:
name: kafkaesque-jdk${{ matrix.java }}-${{ matrix.os }}-msi
path: build/jpackage/*.msi
- name: Sign release (macOS)
run: |
xattr -cr build/jpackage/*.dmg
codesign --sign - --deep --force --preserve-metadata=entitlements,requirements,flags,runtime build/jpackage/*.dmg
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'macos-12'
- name: Create release (macOS)
uses: softprops/action-gh-release@v1
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'macos-12'
with:
files: build/jpackage/*.dmg
- name: Create release (Ubuntu)
uses: softprops/action-gh-release@v1
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'ubuntu-22.04'
with:
files: |
build/jpackage/*.deb
build/jpackage/*.rpm
- name: Create release (Windows)
uses: softprops/action-gh-release@v1
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'windows-2022'
with:
files: build/jpackage/*.exe
- name: Extract version (macOS)
id: extract-version
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'macos-12'
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
echo "tag-name=${TAG_NAME:1}" >> $GITHUB_OUTPUT
- name: Bump Homebrew cask version (macOS)
uses: MWin123/[email protected]
if: |
startsWith(github.ref, 'refs/tags/') &&
matrix.os == 'macos-12'
with:
formula-name: homebrew-esque
formula-path: Casks/kafkaesque.rb
homebrew-tap: patschuh/homebrew-esque
base-branch: main
create-pullrequest: true
tag-name: ${{ steps.extract-version.outputs.tag-name }}
download-url: https://github.com/patschuh/KafkaEsque/releases/download/v${{ steps.extract-version.outputs.tag-name }}/KafkaEsque-${{ steps.extract-version.outputs.tag-name }}.dmg
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}