diff --git a/.github/workflows/java-test.yaml b/.github/workflows/java-test.yaml index cb72ad92..56a02d30 100644 --- a/.github/workflows/java-test.yaml +++ b/.github/workflows/java-test.yaml @@ -88,7 +88,7 @@ jobs: path: | java/target/classes/native - add-centos7-jni: + add-centos7-jni-and-deploy: runs-on: ubuntu-latest container: image: "kcllang/kcl-java-builder-centos7:0.1.0" @@ -136,45 +136,6 @@ jobs: name: kcl-lib path: java/target/*.jar - deploy: - runs-on: ubuntu-latest - - permissions: - contents: read - packages: write - if: "startsWith(github.ref, 'refs/tags/')" - needs: [ add-centos7-jni ] - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Set up JDK 8 - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '8' - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Download Artifact - uses: actions/download-artifact@v3 - with: - name: kcl-lib - path: java/target/ - - - name: Deploy to Github Packages - if: github.event_name == 'push' && github.ref == 'refs/heads/main' - working-directory: java - run: | - mvn package deploy \ - -DskipTests=true \ - -DskipCompile=true \ - -Dcargo-build.profile=release \ - -DserverId=github \ - -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} - - name: Release to Github Packages if: "startsWith(github.ref, 'refs/tags/')" working-directory: java diff --git a/java/pom.xml b/java/pom.xml index c9062c3d..dd4bb93d 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -13,6 +13,12 @@ https://kcl-lang.io + + scm:git:git://github.com/kcl-lang/lib.git + scm:git:ssh://github.com/kcl-lang/lib.git + http://github.com/kcl-lang/lib.git + + 1.8 2.20 @@ -29,6 +35,9 @@ 2.36.0 2.39.0 3.6.3 + + yyyyMMddHHmmss + ${maven.build.timestamp} @@ -217,6 +226,40 @@ maven-javadoc-plugin ${maven-javadoc-plugin.version} + + org.codehaus.mojo + buildnumber-maven-plugin + 1.4 + + + validate + + create + + + + + false + false + {0,date,yyyyMMddHHmmss} + + + + maven-jar-plugin + 3.2.0 + + + + true + + + ${buildNumber} + ${maven.build.timestamp} + + + ${project.artifactId}-${project.version}-${maven.build.timestamp} + +