From 4306a7dbce104f512b48d0001b78f6cd0658a601 Mon Sep 17 00:00:00 2001 From: alexgomezlf <99926015+alexgomezlf@users.noreply.github.com> Date: Mon, 25 Nov 2024 17:57:11 -0500 Subject: [PATCH] Alex/v1 update pipeline and veracode (#75) * update pipeline and veracode * update version * update unit test action * update type * add publishing profile * update server id * update readme --------- Co-authored-by: alexandria.gomez --- .github/workflows/main.yml | 93 ++++++++------------------------------ CHANGELOG.md | 8 +++- README.md | 6 ++- pom.xml | 46 ++++++++++--------- 4 files changed, 55 insertions(+), 98 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6e2623d..382b13f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,7 +9,7 @@ on: workflow_dispatch: env: - VERSION_PREFIX: 1.0.0 + VERSION_PREFIX: 1.1.1 jobs: build-n-test: @@ -17,10 +17,10 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' @@ -35,7 +35,7 @@ jobs: run: mvn test - name: Publish Test Results - uses: EnricoMi/publish-unit-test-result-action@v1 + uses: EnricoMi/publish-unit-test-result-action@v2 if: always() with: files: "target/surefire-reports/*.xml" @@ -46,10 +46,10 @@ jobs: needs: [ build-n-test ] steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' @@ -64,7 +64,7 @@ jobs: run: mv ${{ github.workspace }}/target/site/ ${{ github.workspace }}/docs_temp/${{ github.ref_name }} - name: Upload a Build Artifact - uses: actions/upload-artifact@v2.3.1 + uses: actions/upload-artifact@v4 with: name: documentation-artifact # A file, directory or wildcard pattern that describes what to upload @@ -83,7 +83,7 @@ jobs: run: mkdir -p ./docs_temp/${{ github.ref_name }}/html/ - name: Download a Build Artifact - uses: actions/download-artifact@v3.0.0 + uses: actions/download-artifact@v4 with: name: documentation-artifact path: ${{ github.workspace }}/docs_temp/${{ github.ref_name }}/html/ @@ -100,55 +100,6 @@ jobs: - name: Delete temporary directory run: rm -r ./docs_temp/${{ github.ref_name }}/html/ - - publish-preview-package: - runs-on: ubuntu-latest - environment: preview - if: ${{ github.run_attempt != 1 }} - needs: [ build-n-test, build-documentation ] # wait for build to finish - - steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'temurin' - - - name: Build with Maven - run: mvn -B package -Dmaven.test.skip=true --file pom.xml - - - name: Set up Apache Maven Central - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'temurin' - server-id: ossrh - server-username: MAVEN_USERNAME - server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} - gpg-passphrase: MAVEN_GPG_PASSPHRASE - - - name: Set Java Package Version environment - run: echo "PACKAGE_VERSION=${{ env.VERSION_PREFIX }}-preview-${{ github.run_id }}-SNAPSHOT" >> $GITHUB_ENV - - - name: Set Java Package Version - run: mvn versions:set -DnewVersion=${{ env.PACKAGE_VERSION }} - - - name: Publish to Sonatype - run: mvn clean deploy -Dmaven.test.skip=true -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} - env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} - - - name: Tag commit - uses: rickstaa/action-create-tag@v1 - with: - tag: ${{ env.PACKAGE_VERSION }} - commit_sha: ${{ github.sha }} - message: Workflow run ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} publish-production-package: runs-on: ubuntu-latest @@ -157,28 +108,22 @@ jobs: needs: [ build-n-test, build-documentation ] # wait for build to finish steps: - - uses: actions/checkout@v2 - - - name: Set up JDK 8 - uses: actions/setup-java@v3 - with: - java-version: '8' - distribution: 'temurin' - - - name: Build with Maven - run: mvn -B package -Dmaven.test.skip=true --file pom.xml + - uses: actions/checkout@v4 - name: Set up Apache Maven Central - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: '8' distribution: 'temurin' - server-id: ossrh + server-id: central server-username: MAVEN_USERNAME server-password: MAVEN_PASSWORD - gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE + - name: Import GPG Key + run: | + echo "${{ secrets.MAVEN_GPG_SECRET_KEY }}" | gpg --batch --import + - name: Set Java Package Version environment run: echo "PACKAGE_VERSION=${{ env.VERSION_PREFIX }}" >> $GITHUB_ENV @@ -186,11 +131,11 @@ jobs: run: mvn versions:set -DnewVersion=${{ env.PACKAGE_VERSION }} - name: Publish to Maven Central - run: mvn clean deploy -P release -Dmaven.test.skip=true -Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + run: mvn clean deploy -Pdeploy-to-maven -Dmaven.test.skip=true -Dgpg.passphrase=${{ secrets.MAVEN_GPG_SECRET_KEY_PASSPHRASE }} env: - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }} - MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} + MAVEN_USERNAME: ${{ secrets.MAVEN_USERTOKEN_USERNAME }} + MAVEN_PASSWORD: ${{ secrets.MAVEN_USERTOKEN_PASSWORD }} + MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_SECRET_KEY_PASSPHRASE }} - name: Tag commit uses: rickstaa/action-create-tag@v1 diff --git a/CHANGELOG.md b/CHANGELOG.md index cf9665b..a2e722a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 1.1.1 + +### Chore & Maintenance + +- Update dependency version for `nimbus-jose-jwt` due to vulnerability + ## 1.1.0 ### Features @@ -14,4 +20,4 @@ ### Features -- Add self-hosted API Server support. \ No newline at end of file +- Add self-hosted API Server support. diff --git a/README.md b/README.md index 83af589..d1cec1c 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,12 @@ # Laserfiche API Client Core +**[Deprecated]: Please use the [latest version](https://github.com/Laserfiche/lf-api-client-core-java)** + Implementation of various foundational APIs for Laserfiche, including authorization APIs such as OAuth 2.0 flows for secure and easy access to Laserfiche APIs. ## Documentation -- [Java Doc for Laserfiche API Client Core library](https://s01.oss.sonatype.org/service/local/repositories/releases/archive/com/laserfiche/lf-api-client-core/1.0.0/lf-api-client-core-1.0.0-javadoc.jar/!/index.html) +- [Laserfiche API Client Core library](https://central.sonatype.com/artifact/com.laserfiche/lf-api-client-core) ## Installation @@ -14,6 +16,6 @@ Add the following to your pom.xml file: com.laserfiche lf-api-client-core - 1.0.0 + 1.0 ``` \ No newline at end of file diff --git a/pom.xml b/pom.xml index ed13502..2af75a7 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,5 @@ - + 4.0.0 com.laserfiche lf-api-client-core @@ -33,29 +33,14 @@ - - ossrh - https://s01.oss.sonatype.org/content/repositories/snapshots - - ossrh - https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ + central + https://repo1.maven.org/maven2/ - - org.sonatype.plugins - nexus-staging-maven-plugin - 1.6.7 - true - - ossrh - https://s01.oss.sonatype.org/ - true - - org.apache.maven.plugins maven-surefire-plugin @@ -164,7 +149,7 @@ org.apache.maven.plugins maven-gpg-plugin - 1.6 + 3.2.6 sign-artifacts @@ -197,11 +182,30 @@ + + + deploy-to-maven + + + + org.sonatype.central + central-publishing-maven-plugin + 0.6.0 + true + + central + true + + + + + + com.nimbusds nimbus-jose-jwt - 9.22 + 9.41.2 com.fasterxml.jackson.core