Skip to content

Commit 248fbf2

Browse files
gbrigandiclaude
andcommitted
Make macOS code signing optional when secrets not configured
Skip signing and notarization steps if Apple secrets are not set, allowing the release workflow to succeed without code signing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 9a50623 commit 248fbf2

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ jobs:
101101
fi
102102
103103
- name: Import Apple Certificate (macOS only)
104-
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14'
104+
if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_CERTIFICATE_BASE64 != '' }}
105105
env:
106106
APPLE_CERTIFICATE_BASE64: ${{ secrets.APPLE_CERTIFICATE_BASE64 }}
107107
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
@@ -136,7 +136,7 @@ jobs:
136136
rm certificate.p12 DeveloperIDG2CA.cer AppleWWDRCAG3.cer
137137
138138
- name: Code Sign Binary (macOS only)
139-
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14'
139+
if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_CERTIFICATE_BASE64 != '' }}
140140
env:
141141
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
142142
run: |
@@ -155,7 +155,7 @@ jobs:
155155
/usr/bin/codesign --verify --verbose ./target/${{ matrix.target }}/release/${{ matrix.output_name }}
156156
157157
- name: Notarize Binary (macOS only)
158-
if: matrix.os == 'macos-latest' || matrix.os == 'macos-14'
158+
if: ${{ (matrix.os == 'macos-latest' || matrix.os == 'macos-14') && secrets.APPLE_API_KEY_BASE64 != '' }}
159159
env:
160160
APPLE_API_KEY_BASE64: ${{ secrets.APPLE_API_KEY_BASE64 }}
161161
APPLE_API_KEY_ID: ${{ secrets.APPLE_API_KEY_ID }}

0 commit comments

Comments
 (0)