Skip to content

Merge branch 'release/1.0-20241111' #38

Merge branch 'release/1.0-20241111'

Merge branch 'release/1.0-20241111' #38

name: Deploy New SNAPSHOT
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '**/pom.xml'
jobs:
deploy:
runs-on: ubuntu-latest
name: deploy
steps:
- uses: actions/checkout@v4
with:
ref: main
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
java-package: jdk
- name: Check for SNAPSHOT version
id: check-snapshot
run: |
VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if [[ $VERSION == *"-SNAPSHOT" ]]; then
echo "is_snapshot=true" >> $GITHUB_OUTPUT
# echo "::set-output name=is_snapshot::true"
else
echo "is_snapshot=false" >> $GITHUB_OUTPUT
# echo "::set-output name=is_snapshot::false"
fi
- name: Build and Deploy SNAPSHOT
if: steps.check-snapshot.outputs.is_snapshot == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OSS_SONATYPE_TOKEN: ${{ secrets.OSS_SONATYPE_TOKEN }}
run: mvn -B -Pjdk-8 clean deploy --file pom.xml -s settings-template.xml