Display Gitlab authentication error stacktrace (#561) #9
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: | |
| build: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up JDK 21 | |
| uses: actions/setup-java@v4 | |
| with: | |
| java-version: '21' | |
| distribution: 'temurin' | |
| - name: Cache Gradle packages | |
| uses: actions/cache@v4 | |
| 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: Docker login | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.MICHELIN_DOCKER_HUB_USERNAME }} | |
| password: ${{ secrets.MICHELIN_DOCKER_HUB_PASSWD }} | |
| - name: Docker build and push | |
| run: | | |
| if [ "${{ steps.metadata.outputs.is_latest_version }}" == "true" ]; then | |
| ./gradlew dockerBuild dockerPush -PreleaseLatest | |
| else | |
| ./gradlew dockerBuild dockerPush | |
| fi | |
| - name: Generate release changelog | |
| uses: mikepenz/release-changelog-builder-action@v5 | |
| id: build_changelog | |
| with: | |
| configuration: "changelog-builder.json" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Create release | |
| uses: ncipollo/[email protected] | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| body: ${{ steps.build_changelog.outputs.changelog }} | |
| artifacts: ${{ github.workspace }}/build/libs/ns4kafka-${{ steps.metadata.outputs.current_version }}.jar | |
| draft: true | |
| prerelease: true | |
| allowUpdates: true |