From 7b1745822d665e957662194fd2e30b5de45e00c2 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Tue, 23 Apr 2024 03:43:20 -0400 Subject: [PATCH] Add Java SDK workflow --- .gitea/workflows/publish-java-sdk.yml | 53 +++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .gitea/workflows/publish-java-sdk.yml diff --git a/.gitea/workflows/publish-java-sdk.yml b/.gitea/workflows/publish-java-sdk.yml new file mode 100644 index 0000000..3444481 --- /dev/null +++ b/.gitea/workflows/publish-java-sdk.yml @@ -0,0 +1,53 @@ +name: Publish Java SDK + +on: + push: + branches: ["master"] + paths: + [".gitea/workflows/publish-java-sdk.yml", "Java-SDK/**", "!Java-SDK/README.md"] + +jobs: + docker: + strategy: + matrix: + java-version: ["17"] + maven-version: ["3.8.5"] + runs-on: "ubuntu-latest" + defaults: + run: + working-directory: "./Java-SDK" + + # Steps to run + steps: + # Checkout the repo + - name: Checkout + uses: actions/checkout@v4 + + # Setup Java and Maven + - name: Set up JDK and Maven + uses: s4u/setup-maven-action@v1.12.0 + with: + java-version: ${{ matrix.java-version }} + distribution: "zulu" + maven-version: ${{ matrix.maven-version }} + + # Configure Maven settings + - name: Maven Settings + uses: s4u/maven-settings-action@v2.8.0 + with: + servers: |- + [ + { + "id": "rainnny-repo-public", + "username": "${{ secrets.PRIVATE_MAVEN_USER }}", + "password": "${{ secrets.PRIVATE_MAVEN_PASS }}" + } + ] + + # Build the project + - name: Maven Build + run: mvn clean package -e -T6C + + # Publish to Maven + - name: Publish to Maven + run: mvn deploy -Pgen-javadocs -B -Dstyle.color=always --update-snapshots -e -T6C \ No newline at end of file