diff --git a/.github/workflows/publish-java-cdk-command.yml b/.github/workflows/publish-java-cdk-command.yml index e4571844bba9..7fdb2e317e05 100644 --- a/.github/workflows/publish-java-cdk-command.yml +++ b/.github/workflows/publish-java-cdk-command.yml @@ -57,6 +57,9 @@ env: GITREF: ${{ github.event.inputs.gitref || github.ref }} FORCE: "${{ github.event.inputs.force == null && true || github.event.inputs.force }}" DRY_RUN: "${{ github.event.inputs.dry-run == null && true || github.event.inputs.dry-run }}" + CDK_VERSION_FILE_PATH: "./airbyte-cdk/java/airbyte-cdk/src/main/resources/version.properties" + # Uncomment and replace above when CDK 0.1.0 is released: + # CDK_VERSION_FILE_PATH: "./airbyte-cdk/java/airbyte-cdk/src/main/resources/version.properties" jobs: # We are using these runners because they are the same as the one for `publish-command.yml` @@ -100,7 +103,11 @@ jobs: - name: Read Target Java CDK version id: read-target-java-cdk-version run: | - cdk_version=$(cat ./airbyte-cdk/java/airbyte-cdk/core/src/main/resources/version.properties | tr -d '\n') + cdk_version=$(cat $CDK_VERSION_FILE_PATH | tr -d '\n') + if [[ -z "$cdk_version" ]]; then + echo "Failed to retrieve CDK version from $CDK_VERSION_FILE_PATH" + exit 1 + fi echo "CDK_VERSION=${cdk_version}" >> $GITHUB_ENV - name: Check for already-published version (${{ env.CDK_VERSION }}, FORCE=${{ env.FORCE }}) if: ${{ !(env.FORCE == 'true') }} @@ -119,12 +126,12 @@ jobs: echo "Version ${VERSION} of ${ARTIFACT_ID} has not been published. Proceeding..." fi - name: Build Java CDK - run: ./gradlew --no-daemon :airbyte-cdk:java:java-cdk:build + run: ./gradlew --no-daemon :airbyte-cdk:java:airbyte-cdk:build - name: Publish Java Modules to LocalMaven (Dry-Run) - run: ./gradlew --no-daemon :airbyte-cdk:java:java-cdk:publishToLocalMaven + run: ./gradlew --no-daemon :airbyte-cdk:java:airbyte-cdk:publishToLocalMaven - name: Publish Java Modules to CloudRepo if: ${{ env.DRY_RUN == 'false' }} - run: ./gradlew --no-daemon :airbyte-cdk:java:java-cdk:publish + run: ./gradlew --no-daemon :airbyte-cdk:java:airbyte-cdk:publish env: CLOUDREPO_USER: ${{ secrets.CLOUDREPO_USER }} CLOUDREPO_PASSWORD: ${{ secrets.CLOUDREPO_PASSWORD }}