Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/maven/surefire-plugin.version-…
Browse files Browse the repository at this point in the history
…3.2.3
  • Loading branch information
Stef3st authored Dec 14, 2023
2 parents b37ad71 + cdb4027 commit 0919589
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
23 changes: 11 additions & 12 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,68 +15,67 @@ name: release-please
jobs:
release_please:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: google-github-actions/release-please-action@v3
- uses: google-github-actions/release-please-action@v4
id: release
with:
release-type: maven
package-name: compas-scl-auto-alignment
# The logic below handles the docker hub publication:
push_to_registry:
needs: release_please
if: needs.release_please.outputs.release_created == "true"
name: Build and publish
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout
if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- name: Cache Docker Register
if: ${{ steps.release.outputs.release_created }}
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ hashFiles('**/Dockerfile') }}
- name: Cache Maven packages
if: ${{ steps.release.outputs.release_created }}
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Extract tag name
if: ${{ steps.release.outputs.release_created }}
id: extract_tagname
shell: bash
# Extract the tag name from the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"

- name: Set up JDK 17
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: Set up Docker Buildx
if: ${{ steps.release.outputs.release_created }}
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
if: ${{ steps.release.outputs.release_created }}
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- name: Create custom Maven Settings.xml
if: ${{ steps.release.outputs.release_created }}
uses: whelk-io/maven-settings-xml-action@v21
with:
output_file: custom_maven_settings.xml
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
- name: Set version with Maven
if: ${{ steps.release.outputs.release_created }}
run: ./mvnw -B versions:set -DprocessAllModules=true -DnewVersion=${{ steps.extract_tagname.outputs.tagname }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with Maven to GitHub Packages and Docker Hub
if: ${{ steps.release.outputs.release_created }}
run: ./mvnw -B -s custom_maven_settings.xml -Pnative-image,release clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!--
SPDX-FileCopyrightText: 2023 Alliander N.V.
SPDX-License-Identifier: Apache-2.0
-->
For older changelogs, please check the release tag on GitHub.

0 comments on commit 0919589

Please sign in to comment.