Skip to content

Commit 36ee8ff

Browse files
Skip codesigning for non-prod builds
- Add environment check to codesign, notarize, and verify signing steps - Only run Apple signing workflow when building for prod
1 parent 137acb9 commit 36ee8ff

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

.github/workflows/build-and-deploy.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ jobs:
113113
-o "$BINARY_NAME" .
114114
115115
- name: Codesign
116+
if: needs.resolve-env.outputs.environment == 'prod'
116117
env:
117118
APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
118119
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
@@ -139,6 +140,7 @@ jobs:
139140
"cmd/deepsource/${BINARY_NAME}"
140141
141142
- name: Notarize
143+
if: needs.resolve-env.outputs.environment == 'prod'
142144
env:
143145
APPLE_ID: ${{ secrets.APPLE_ID }}
144146
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
@@ -155,6 +157,7 @@ jobs:
155157
--wait
156158
157159
- name: Verify signing
160+
if: needs.resolve-env.outputs.environment == 'prod'
158161
run: |
159162
BINARY_NAME="${{ needs.resolve-env.outputs.binary_name }}"
160163
codesign --verify --verbose "cmd/deepsource/${BINARY_NAME}"

0 commit comments

Comments
 (0)