diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 70816ddf20..11fac6c7d5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -92,6 +92,10 @@ jobs: runs-on: ${{ matrix.os }} + env: + # Only sign/notarize if the secrets will be available + SIGN_INSTALLER: ${{ github.repository == 'SasView/sasview') && 'true' || '' }} + steps: - name: Configuration of this job run: | @@ -271,7 +275,7 @@ jobs: tar zcf sasview6.tar.gz sasview - name: Sign executable and create dmg (OSX) - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} + if: ${{ matrix.installer && startsWith(matrix.os, 'macos') && env.SIGN_INSTALLER }} env: MACOS_CERTIFICATE: ${{ secrets.MACOS_CERTIFICATE_ISA }} MACOS_CERTIFICATE_PWD: ${{ secrets.MACOS_CERTIFICATE_ISA_PWD }} @@ -292,7 +296,7 @@ jobs: codesign -s "Developer ID Application: The International Scattering Alliance (8CX8K63BQM)" SasView6.dmg - name: Notarize Release Build (OSX) - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} + if: ${{ matrix.installer && startsWith(matrix.os, 'macos') && env.SIGN_INSTALLER }} uses: lando/notarize-action@v2 with: product-path: "installers/dist/SasView6.dmg" @@ -303,13 +307,13 @@ jobs: verbose: True - name: Staple Release Build (OSX) - if: ${{ matrix.installer && startsWith(matrix.os, 'macos') }} + if: ${{ matrix.installer && startsWith(matrix.os, 'macos') && env.SIGN_INSTALLER }} uses: BoundfoxStudios/action-xcode-staple@v1 with: product-path: "installers/dist/SasView6.dmg" - name: Sign binary - if: ${{ matrix.installer && startsWith(matrix.os, 'windows') }} + if: ${{ matrix.installer && startsWith(matrix.os, 'windows') && env.SIGN_INSTALLER }} uses: lando/code-sign-action@v2 with: file: installers/dist/setupSasView.exe