Merge branch 'master' into renovate/testcontainers-keycloak.version #879
This file contains 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: CI | |
on: push | |
env: | |
mainBranchName: master | |
semanticReleaseVersion: 19.0.5 | |
semanticChangelogVersion: 6.0.1 | |
semanticGitVersion: 10.0.1 | |
semanticExecVersion: 6.0.3 | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Get branch name | |
run: | | |
echo "GITHUB_BRANCH=${GITHUB_REF#refs/heads/}" >> $GITHUB_ENV | |
- name: Display branch name | |
run: | | |
echo "Branche : ${{ env.GITHUB_BRANCH }}" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
persist-credentials: false | |
- name: Set up JDK 17 | |
uses: actions/[email protected] | |
with: | |
java-version: 17 | |
distribution: temurin | |
- name: Cache local Maven repository | |
uses: actions/[email protected] | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Import GPG and Prepare build | |
run: export GPG_TTY=$(tty) && echo -e "$GPG_PRIVATE_KEY" | gpg --batch --import && chmod +x mvnw | |
env: | |
GPG_PRIVATE_KEY: ${{ secrets.gpg_private_key }} | |
- name: Prepare Maven Settings | |
uses: s4u/[email protected] | |
with: | |
githubServer: false | |
properties: | | |
[ | |
{"skipNexusStagingDeployMojo": "false"}, | |
{"gpg.passphrase": "${{ secrets.GPG_PASSPHRASE }}"}, | |
{"altSnapshotDeploymentRepository": "snapshots::default::https://oss.sonatype.org/content/repositories/snapshots"}, | |
{"altReleaseDeploymentRepository": "releases::default::https://oss.sonatype.org/service/local/staging/deploy/maven2"} | |
] | |
servers: | | |
[{ | |
"id": "ossrh", | |
"username": "${{ secrets.NEXUS_USERNAME }}", | |
"password": "${{ secrets.NEXUS_PASSWORD }}" | |
}] | |
- name: Verify Maven | |
run: ./mvnw -B -ntp verify 1>&2 | |
- name: Semantic Prerelease | |
if: env.GITHUB_BRANCH != env.mainBranchName | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: ${{ env.semanticReleaseVersion }} | |
branches: ${{ env.GITHUB_BRANCH }} | |
extra_plugins: | | |
@semantic-release/changelog@${{ env.semanticChangelogVersion }} | |
@semantic-release/git@${{ env.semanticGitVersion }} | |
@semantic-release/exec@${{ env.semanticExecVersion }} | |
dry_run: true | |
env: | |
GITHUB_TOKEN: ${{ secrets.CR_TOKEN }} | |
- name: Semantic Release | |
if: env.GITHUB_BRANCH == env.mainBranchName | |
uses: cycjimmy/semantic-release-action@v3 | |
with: | |
semantic_version: ${{ env.semanticReleaseVersion }} | |
branches: ${{ env.mainBranchName }} | |
extra_plugins: | | |
@semantic-release/changelog@${{ env.semanticChangelogVersion }} | |
@semantic-release/git@${{ env.semanticGitVersion }} | |
@semantic-release/exec@${{ env.semanticExecVersion }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.CR_TOKEN }} |