From 7ce9c384a0a0f69025051663e963d9d22347419e Mon Sep 17 00:00:00 2001 From: Mukilan Thiyagarajan Date: Fri, 20 Sep 2024 12:23:06 +0530 Subject: [PATCH] ohos: handle missing signing config on forks Signed-off-by: Mukilan Thiyagarajan --- .github/workflows/ohos.yml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ohos.yml b/.github/workflows/ohos.yml index 0d04bac26b2d0..513efc3c84de4 100644 --- a/.github/workflows/ohos.yml +++ b/.github/workflows/ohos.yml @@ -71,6 +71,7 @@ jobs: - name: "Setup HAP signing config" env: SIGNING_MATERIAL: ${{ secrets.SERVO_OHOS_SIGNING_MATERIAL }} + if: ${{ env.SIGNING_MATERIAL != '' }} # Allows the build to pass on forks. run: | cd ~ echo "${SIGNING_MATERIAL}" | base64 -d > servo-ohos-material.zip @@ -89,8 +90,15 @@ jobs: name: cargo-timings-ohos-${{ matrix.arch }} # Using a wildcard here ensures that the archive includes the path. path: target/cargo-timings-* - - name: Upload HAP artifact + - name: Upload signed HAP artifact + if: ${{ env.SERVO_OHOS_SIGNING_CONFIG != '' }} # Build output has different name if not signed. uses: actions/upload-artifact@v4 with: name: ${{ inputs.profile }}-binary-ohos-${{ matrix.arch }} path: target/openharmony/${{ matrix.arch }}/${{ inputs.profile }}/entry/build/default/outputs/default/servoshell-default-signed.hap + - name: Upload unsigned HAP artifact + if: ${{ env.SERVO_OHOS_SIGNING_CONFIG == '' }} # Build output has different name if not signed. + uses: actions/upload-artifact@v4 + with: + name: ${{ inputs.profile }}-binary-ohos-${{ matrix.arch }} + path: target/openharmony/${{ matrix.arch }}/${{ inputs.profile }}/entry/build/default/outputs/default/servoshell-default-unsigned.hap