From 5492beba668b21f0c5eba5112d90925098506ba4 Mon Sep 17 00:00:00 2001 From: h4ckx0r Date: Thu, 15 May 2025 22:05:30 +0200 Subject: [PATCH] Prueba workflow --- .gitea/workflows/publish.yml | 47 ++++++++++++++++++++++++++++++++++++ pom.xml | 18 ++++++-------- 2 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 .gitea/workflows/publish.yml diff --git a/.gitea/workflows/publish.yml b/.gitea/workflows/publish.yml new file mode 100644 index 0000000..38d6fb5 --- /dev/null +++ b/.gitea/workflows/publish.yml @@ -0,0 +1,47 @@ +name: Build and Publish to Gitea Packages + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: '23' + + - name: Build with Maven + run: mvn clean package + + - name: Create Maven settings.xml + run: | + mkdir -p ~/.m2 + cat > ~/.m2/settings.xml < + + + gitea + ${GITEA_USER} + ${GITEA_TOKEN} + + + + EOF + env: + GITEA_USER: ${{ secrets.GITEA_USER }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} + + - name: Publish to Gitea Package Registry + run: mvn deploy -DaltDeploymentRepository=gitea::default::https://git.h4ckdata.es/api/packages/h4ckx0r/maven + env: + GITEA_USER: ${{ secrets.GITEA_USER }} + GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 46fff7a..9751c1e 100644 --- a/pom.xml +++ b/pom.xml @@ -49,17 +49,17 @@ com.squareup.okhttp3 okhttp - 3.12.12 + 4.9.2 org.json json - 20090211 + 20231013 junit junit - 4.12 + 4.13.1 test @@ -71,13 +71,9 @@ - - ossrh - https://oss.sonatype.org/content/repositories/snapshots - - ossrh - https://oss.sonatype.org/service/local/staging/deploy/maven2/ + gitea + https://git.h4ckdata.es/api/packages/h4ckx0r/maven @@ -88,8 +84,8 @@ maven-compiler-plugin 3.5.1 - 1.7 - 1.7 + 23 + 23 -Xlint:unchecked