From 4b496f1ad55f4c5be12b16afe0726cb2518ecd63 Mon Sep 17 00:00:00 2001 From: Corneil du Plessis Date: Wed, 15 May 2024 18:21:00 +0200 Subject: [PATCH] Publish docs. --- .github/workflows/publish-docs.yml | 94 ++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/publish-docs.yml diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml new file mode 100644 index 0000000000..c98ffa8edf --- /dev/null +++ b/.github/workflows/publish-docs.yml @@ -0,0 +1,94 @@ +name: Publish Documentation + +on: + workflow_dispatch: + inputs: + version: + description: 'Version to publish' + required: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-java@v3 + with: + java-version: '8' + distribution: 'liberica' + - uses: jvalkeal/setup-maven@v1 + with: + maven-version: 3.8.8 + maven-mirror: 'https://dlcdn.apache.org/maven/maven-3/' + - uses: jfrog/setup-jfrog-cli@v1 + with: + version: 1.46.4 + env: + JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }} + - uses: actions/cache@v3 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-m2- + +# target deploy repos + - name: Configure JFrog Cli + run: | + jfrog rt mvnc \ + --server-id-resolve=repo.spring.io \ + --server-id-deploy=repo.spring.io \ + --repo-resolve-releases=libs-release-staging \ + --repo-resolve-snapshots=libs-snapshot \ + --repo-deploy-releases=libs-staging-local \ + --repo-deploy-snapshots=libs-snapshot-local + echo JFROG_CLI_BUILD_NAME=spring-cloud-dataflow-main-release >> $GITHUB_ENV + echo JFROG_CLI_BUILD_NUMBER=$GITHUB_RUN_NUMBER >> $GITHUB_ENV + + - name: 'Install: xmllint' + uses: ./.github/actions/install-xmlutils +# build and publish to configured target + - name: Build and Publish + run: | + jfrog rt mvn build-helper:parse-version versions:set \ + -gs .github/settings.xml \ + -DskipResolution=true \ + -DprocessAllModules=true \ + -DgenerateBackupPoms=false \ + -Dartifactory.publish.artifacts=false \ + -DnewVersion=${{ inputs.version }} \ + -B + jfrog rt mvn versions:set-property \ + -gs .github/settings.xml \ + -Pstagingrelease \ + -DskipResolution=true \ + -DgenerateBackupPoms=false \ + -Dproperty=dataflow.version \ + -DnewVersion=${{ inputs.version }} \ + -B + jfrog rt mvn versions:set-property \ + -gs .github/settings.xml \ + -Pstagingrelease \ + -DskipResolution=true \ + -DgenerateBackupPoms=false \ + -Dproperty=skipper.version \ + -DnewVersion=${{ inputs.version }} \ + -B + spring_cloud_dataflow_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout) + echo "spring_cloud_dataflow_version=$spring_cloud_dataflow_version" >> $GITHUB_ENV + echo "::notice ::set dataflow.version=${spring_cloud_dataflow_version}" + echo "::notice ::build-clean" + jfrog rt build-clean + echo "::notice ::set-package-version" + ./spring-cloud-dataflow-package/set-package-version.sh + echo "::notice ::install" + mvn -am -pl :spring-cloud-skipper-server-core install -DskipTests -T 1C + jfrog rt mvn -gs .github/settings.xml \ + -Pstagingrelease,full,deploymentfiles,asciidoctordocs,restdocs \ + -pl :spring-cloud-dataflow-classic-docs,:spring-cloud-dataflow-docs,:spring-cloud-skipper-docs \ + -B install -DskipTests + echo "::notice ::build-publish" + jfrog rt build-publish + echo "::info ::spring_cloud_dataflow_version=$spring_cloud_dataflow_version" + echo "::info ::spring_cloud_dataflow_buildname=$JFROG_CLI_BUILD_NAME" + echo "::info ::spring_cloud_dataflow_buildnumber=$JFROG_CLI_BUILD_NUMBER"