Skip to content

Commit

Permalink
Merge branch 'develop' into dependabot/maven/com.powsybl-powsybl-sing…
Browse files Browse the repository at this point in the history
…le-line-diagram-core-4.0.0
  • Loading branch information
juancho0202 authored Jan 15, 2024
2 parents ba91264 + 6240c74 commit 0c44fcc
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 16 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 }}
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
run: cat $GITHUB_EVENT_PATH
- name: Download PR number artifact
if: github.event.workflow_run.event == 'pull_request'
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
workflow: SonarCloud Build
run_id: ${{ github.event.workflow_run.id }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
run: echo ${{ github.event.number }} > PR_NUMBER.txt
- name: Archive PR number
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: PR_NUMBER
path: PR_NUMBER.txt
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.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ SPDX-License-Identifier: Apache-2.0
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<compiler-plugin.version>3.11.0</compiler-plugin.version>
<surefire-plugin.version>3.2.2</surefire-plugin.version>
<surefire-plugin.version>3.2.3</surefire-plugin.version>
<sonarqube-plugin.version>3.2.0</sonarqube-plugin.version>

<compas.core.version>0.16.0</compas.core.version>

<quarkus.platform.version>3.6.1</quarkus.platform.version>
<quarkus.platform.version>3.6.3</quarkus.platform.version>
<log4j2.version>2.22.0</log4j2.version>
<powsybl.sld.version>4.0.0</powsybl.sld.version>
<gson.version>2.10.1</gson.version>
Expand Down

0 comments on commit 0c44fcc

Please sign in to comment.