Bump org.mockito:mockito-junit-jupiter from 5.20.0 to 5.21.0 (#305) #15
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| release-jar: | |
| name: Release JAR | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v5 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
| restore-keys: ${{ runner.os }}-gradle | |
| - name: Build | |
| run: ./gradlew build -x test --info | |
| - name: Metadata | |
| id: metadata | |
| run: | | |
| CURRENT_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') | |
| LATEST_VERSION=$(git tag -l --sort=-version:refname | head -1 | cut -d 'v' -f 2) | |
| echo current_version=$(echo $CURRENT_VERSION) >> $GITHUB_OUTPUT | |
| echo is_latest_version=$(echo $(test "$LATEST_VERSION" == "$CURRENT_VERSION" && echo true || echo false)) >> $GITHUB_OUTPUT | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: kafkactl-jar | |
| path: build/libs/kafkactl-${{ steps.metadata.outputs.current_version }}.jar | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.MICHELIN_DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.MICHELIN_DOCKER_HUB_PASSWD }} | |
| - name: Docker push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: .docker/jar.Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| michelin/kafkactl:${{ steps.metadata.outputs.current_version }} | |
| ${{ steps.metadata.outputs.is_latest_version == 'true' && 'michelin/kafkactl:latest' || '' }} | |
| env: | |
| DOCKER_BUILD_SUMMARY: false | |
| - name: Generate release changelog | |
| uses: mikepenz/release-changelog-builder-action@v6 | |
| id: build_changelog | |
| with: | |
| configuration: changelog-builder.json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update release | |
| uses: ncipollo/release-action@v1.20.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| body: ${{ steps.build_changelog.outputs.changelog }} | |
| artifacts: build/libs/kafkactl-${{ steps.metadata.outputs.current_version }}.jar | |
| draft: true | |
| prerelease: true | |
| allowUpdates: true | |
| build-native: | |
| name: Build Native Image ${{ matrix.platform }} | |
| runs-on: ${{ matrix.os }} | |
| outputs: | |
| current_version: ${{ steps.metadata.outputs.current_version }} | |
| is_latest_version: ${{ steps.metadata.outputs.is_latest_version }} | |
| strategy: | |
| matrix: | |
| os: [ 'ubuntu-latest', 'ubuntu-24.04-arm', 'windows-latest', 'macos-latest' ] | |
| include: | |
| - os: 'ubuntu-latest' | |
| platform: 'linux-amd64' | |
| extension: '' | |
| - os: 'ubuntu-24.04-arm' | |
| platform: 'linux-arm64' | |
| extension: '' | |
| - os: 'macos-latest' | |
| platform: 'darwin-arm64' | |
| extension: '' | |
| - os: 'windows-latest' | |
| platform: 'windows-amd64' | |
| extension: '.exe' | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up GraalVM | |
| uses: graalvm/setup-graalvm@v1 | |
| with: | |
| distribution: 'graalvm' | |
| java-version: '21' | |
| native-image-musl: ${{ matrix.os == 'ubuntu-latest' }} | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/.gradle/caches | |
| key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }} | |
| restore-keys: ${{ runner.os }}-gradle | |
| - name: Build | |
| run: ./gradlew nativeCompile ${{ matrix.os == 'ubuntu-latest' && '-Pmusl' || '' }} | |
| - name: Metadata | |
| id: metadata | |
| run: | | |
| CURRENT_VERSION=$(./gradlew properties --no-daemon --console=plain -q | grep "^version:" | awk '{printf $2}') | |
| LATEST_VERSION=$(git tag -l --sort=-version:refname | head -1 | cut -d 'v' -f 2) | |
| echo current_version=$(echo $CURRENT_VERSION) >> $GITHUB_OUTPUT | |
| echo is_latest_version=$(echo $(test "$LATEST_VERSION" == "$CURRENT_VERSION" && echo true || echo false)) >> $GITHUB_OUTPUT | |
| shell: bash | |
| - name: Rename file | |
| run: mv build/native/nativeCompile/kafkactl-${{ steps.metadata.outputs.current_version }}${{ matrix.extension }} build/native/nativeCompile/kafkactl-${{ steps.metadata.outputs.current_version }}-${{ matrix.platform }}${{ matrix.extension }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: kafkactl-${{ matrix.platform }} | |
| path: build/native/nativeCompile/kafkactl-${{ steps.metadata.outputs.current_version }}-${{ matrix.platform }}${{ matrix.extension }} | |
| release-native: | |
| name: Release Native Image | |
| runs-on: ubuntu-latest | |
| needs: build-native | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| pattern: kafkactl-* | |
| path: build/native/nativeCompile | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Docker login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.MICHELIN_DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.MICHELIN_DOCKER_HUB_PASSWD }} | |
| - name: Docker push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: . | |
| file: .docker/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| michelin/kafkactl:${{ needs.build-native.outputs.current_version }}-native | |
| ${{ needs.build-native.outputs.is_latest_version == 'true' && 'michelin/kafkactl:latest-native' || '' }} | |
| env: | |
| DOCKER_BUILD_SUMMARY: false | |
| - name: Generate release changelog | |
| uses: mikepenz/release-changelog-builder-action@v6 | |
| id: build_changelog | |
| with: | |
| configuration: changelog-builder.json | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Update release | |
| uses: ncipollo/release-action@v1.20.0 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| body: ${{ steps.build_changelog.outputs.changelog }} | |
| artifacts: build/native/nativeCompile/kafkactl-*/* | |
| draft: true | |
| prerelease: true | |
| allowUpdates: true |