From ed16207b37f60a8def0df1878052d683b6dd0c60 Mon Sep 17 00:00:00 2001 From: Andrea Cavalli Date: Tue, 9 May 2023 11:46:30 +0200 Subject: [PATCH] Fix deployment --- .github/workflows/platform_natives.yaml | 32 +++++++++++++++----- natives/pom.xml | 40 ++++++++----------------- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/.github/workflows/platform_natives.yaml b/.github/workflows/platform_natives.yaml index ae2d12a..32351e7 100644 --- a/.github/workflows/platform_natives.yaml +++ b/.github/workflows/platform_natives.yaml @@ -49,7 +49,7 @@ jobs: TYPE=${{ matrix.type }} SAFE_TYPE=${TYPE///} # linux-amd64 -> linux-amd64 - REVISION=${{ github.run_number }} + REVISION=4.0.${{ github.run_number }} GH_MATRIX_OS=${{ matrix.os }} GH_MATRIX_TYPE=${{ matrix.type }} @@ -180,8 +180,8 @@ jobs: source ./.github/workflows/scripts/build-${SAFE_TYPE}.sh - uses: actions/upload-artifact@v3 with: - name: natives/target/tdlight-natives-${{env.REVISION}}.jar - path: natives/target/tdlight-natives-${{env.REVISION}}.jar + name: natives/target-${{env.TYPE}}/tdlight-natives-${{env.REVISION}}-${{env.TYPE}}.jar + path: natives/target-${{env.TYPE}}/tdlight-natives-${{env.REVISION}}-${{env.TYPE}}.jar - name: Deploy to Maven (Snapshot) if: github.ref == 'refs/heads/develop' shell: bash @@ -189,8 +189,17 @@ jobs: set -eo pipefail echo "REVISION: $REVISION" echo "TYPE: $TYPE" - - mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package deploy + if [[ "$TYPE" == "linux-amd64-ssl1"]]; then + mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package deploy + else + mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package + mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ + -DrepositoryId=mchv-release-distribution \ + -Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \ + -DpomFile=natives/pom.xml \ + -Dclassifier=bin \ + -Drevision="$REVISION" + fi echo "Done." exit 0 @@ -204,8 +213,17 @@ jobs: set -eo pipefail echo "REVISION: $REVISION" echo "TYPE: $TYPE" - - mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package deploy + if [[ "$TYPE" == "linux-amd64-ssl1"]]; then + mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package deploy + else + mvn -B -f natives/pom.xml -Drevision="$REVISION" -Dnative.type.classifier="$TYPE" clean package + mvn org.apache.maven.plugins:maven-deploy-plugin:3.1.1:deploy-file -Durl=https://mvn.mchv.eu/repository/mchv \ + -DrepositoryId=mchv-release-distribution \ + -Dfile=natives/target-$TYPE/tdlight-natives-$REVISION-$TYPE.jar \ + -DpomFile=natives/pom.xml \ + -Dclassifier=bin \ + -Drevision="$REVISION" + fi echo "Done." exit 0 diff --git a/natives/pom.xml b/natives/pom.xml index fa39bab..2148da0 100644 --- a/natives/pom.xml +++ b/natives/pom.xml @@ -1,7 +1,7 @@ 4.0.0 it.tdlight - TDLight-natives + tdlight-natives ${revision} tdlight natives @@ -10,6 +10,7 @@ UTF-8 4.0.0-SNAPSHOT _invalid_ + ${project.basedir}/target-${native.type.classifier} @@ -30,6 +31,7 @@ HEAD + ${buildDirectory} maven-clean-plugin @@ -73,37 +75,21 @@ + org.apache.maven.plugins maven-install-plugin - 3.0.0-M1 + 3.1.1 + + true + + org.apache.maven.plugins maven-deploy-plugin - 2.8.2 + 3.1.1 + + true + - - - ssl3 - - - ssl3 - True - - false - - - - - org.apache.maven.plugins - maven-jar-plugin - 3.2.0 - - ${native.type.classifier}-ssl3 - - - - - -