diff --git a/.github/workflows/lt-reports-cd.yml b/.github/workflows/lt-reports-cd.yml index 6f07557cf..3d9696c93 100644 --- a/.github/workflows/lt-reports-cd.yml +++ b/.github/workflows/lt-reports-cd.yml @@ -1,14 +1,12 @@ name: lt-reports-cd # Publishes the Karate report-integration fatjar to GitHub Packages on every -# merge into lt-reports. The post-processing service (LambdatestIncPrivate/ -# hyperexecute-postprocessing-service) downloads it from a fixed coordinate at -# Docker build time, so there is nothing to version-bump or rename by hand: -# every merge overwrites the same coordinate, mirroring how the extent report -# jar is published (extentnativereports-1.10-stage). +# merge into lt-reports, under coordinate: # -# coordinate: com.lambdatest:karate-reports:lt-reports -# url: https://maven.pkg.github.com/LambdaTest/karate/com/lambdatest/karate-reports/lt-reports/karate-reports-lt-reports.jar +# com.lambdatest:karate-reports:${project.version}.${lt.patch.version} +# +# project.version tracks upstream karate; lt.patch.version is a LambdaTest-fork +# counter in the root pom that must be bumped on each republish. on: push: @@ -62,11 +60,8 @@ jobs: test -f "${FATJAR}" || { echo "fatjar not found at ${FATJAR}"; ls -lh karate-core/target; exit 1; } ls -lh "${FATJAR}" - # Deploy the fatjar to GitHub Packages under a fixed coordinate. deploy-file - # is used (instead of a plain deploy) so the karate-parent release version - # (1.5.x, used for Maven Central) is never touched. Only runs on lt-reports - # (not workflow_dispatch from other branches) so the package is published - # solely from merges into lt-reports. + # deploy-file (not a plain deploy) keeps the karate-parent release version + # untouched. Guarded to lt-reports so only merges publish, never dispatch. - name: publish to GitHub Packages if: github.ref == 'refs/heads/lt-reports' env: @@ -74,13 +69,16 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | KARATE_VERSION="$(mvn -q -DforceStdout -f karate-core/pom.xml help:evaluate -Dexpression=project.version)" + LT_PATCH_VERSION="$(mvn -q -DforceStdout -f karate-core/pom.xml help:evaluate -Dexpression=lt.patch.version)" + PUBLISH_VERSION="${KARATE_VERSION}.${LT_PATCH_VERSION}" + echo "Publishing karate-reports version: ${PUBLISH_VERSION}" FATJAR="karate-core/target/karate-${KARATE_VERSION}.jar" mvn -B -ntp deploy:deploy-file \ --settings .github/settings.xml \ -Dfile="${FATJAR}" \ -DgroupId=com.lambdatest \ -DartifactId=karate-reports \ - -Dversion=lt-reports \ + -Dversion="${PUBLISH_VERSION}" \ -Dpackaging=jar \ -DrepositoryId=github \ -Durl=https://maven.pkg.github.com/LambdaTest/karate diff --git a/.github/workflows/lt-reports-ci.yml b/.github/workflows/lt-reports-ci.yml index 9fbb8a3a8..ebf3f5311 100644 --- a/.github/workflows/lt-reports-ci.yml +++ b/.github/workflows/lt-reports-ci.yml @@ -7,9 +7,6 @@ name: lt-reports-ci # on PRs before they reach the publish-on-merge workflow. on: - push: - branches: - - lt-reports pull_request: branches: - lt-reports diff --git a/pom.xml b/pom.xml index edd1d69cf..d334aaa06 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,10 @@ + + 1 UTF-8 17 3.13.0