Skip to content

release 1.5.3.

release 1.5.3. #49

name: Snapshot-Java
on:
push:
branches:
- main
jobs:
check-snapshot:
runs-on: ubuntu-latest
outputs:
IS_SNAPSHOT: ${{ steps.set_output_1.outputs.IS_SNAPSHOT }}
steps:
- name: Checkout codes
uses: actions/checkout@v3
- name: Check deploy type
id: set_output_1
run: |
line="$(grep SNAPSHOT VERSION || true)"
echo $line
if [ -n "$line" ]; then
echo "IS_SNAPSHOT=true" >> $GITHUB_OUTPUT
else
echo "IS_SNAPSHOT=false" >> $GITHUB_OUTPUT
fi
snapshot:
runs-on: ubuntu-latest
needs: check-snapshot
if: ${{ needs.check-snapshot.outputs.IS_SNAPSHOT == 'true' }}
steps:
- name: Checkout codes
uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Publish package
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: |
cd source/java
bash build.sh
cd polaris-specification
mvn --batch-mode -U -Psonatype clean deploy -DskipTests