From 8c248c6ce27630bcb3281dd08101a2cb10f22131 Mon Sep 17 00:00:00 2001 From: Rainnny7 Date: Sun, 28 Apr 2024 03:49:11 -0400 Subject: [PATCH] Maven publish workflow --- .gitea/workflows/maven-publish.yml | 45 ++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .gitea/workflows/maven-publish.yml diff --git a/.gitea/workflows/maven-publish.yml b/.gitea/workflows/maven-publish.yml new file mode 100644 index 0000000..cf7baa1 --- /dev/null +++ b/.gitea/workflows/maven-publish.yml @@ -0,0 +1,45 @@ +name: Publish to Maven + +on: + push: + branches: ["master"] + paths: ["./gitea/workflows/**", "src/**", "pom.xml"] + +jobs: + docker: + strategy: + matrix: + java-version: ["17"] + maven-version: ["3.8.5"] + runs-on: "ubuntu-latest" + + # 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@v3.0.0 + with: + servers: |- + [ + { + "id": "rainnny-repo-public", + "username": "${{ secrets.PRIVATE_MAVEN_USER }}", + "password": "${{ secrets.PRIVATE_MAVEN_PASS }}" + } + ] + + # Publish to Maven + - name: Publish to Maven + run: mvn deploy -Pgen-javadocs -B -Dstyle.color=always --update-snapshots -q -T6C \ No newline at end of file