@@ -71,48 +71,51 @@ jobs:
7171 env :
7272 CSC_IDENTITY_AUTO_DISCOVERY : false # Disable auto code signing
7373
74- - name : Azure Login for Code Signing
75- uses : azure/login@v2
76- with :
77- client-id : ${{ secrets.AZURE_CLIENT_ID }}
78- tenant-id : ${{ secrets.AZURE_TENANT_ID }}
79- subscription-id : ${{ secrets.AZURE_SUBSCRIPTION_ID }}
80-
81- - name : Sign Windows AppX with Azure Trusted Signing
82- uses : azure/trusted-signing-action@v0.5.0
83- with :
84- endpoint : https://eus.codesigning.azure.net/
85- trusted-signing-account-name : Allow2
86- certificate-profile-name : Allow2-Dev-Signing
87- files-folder : ${{ github.workspace }}/dist
88- files-folder-filter : appx,msix
89- file-digest : SHA256
90- timestamp-rfc3161 : http://timestamp.acs.microsoft.com
91- timestamp-digest : SHA256
92-
93- - name : Verify Windows signature
94- shell : pwsh
95- run : |
96- Write-Host "=== Verifying AppX/MSIX signatures ==="
97-
98- # Find signtool
99- $signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter "signtool.exe" |
100- Where-Object { $_.FullName -match "x64" } |
101- Sort-Object { [version]($_.FullName -replace '.*\\(\d+\.\d+\.\d+\.\d+)\\.*', '$1') } -Descending |
102- Select-Object -First 1 -ExpandProperty FullName
103-
104- Write-Host "Using signtool: $signtool"
105-
106- # Verify AppX/MSIX signatures
107- Get-ChildItem -Path "dist" -Include "*.appx","*.msix" -Recurse | ForEach-Object {
108- Write-Host "Verifying: $($_.Name)"
109- & $signtool verify /pa $_.FullName
110- if ($LASTEXITCODE -eq 0) {
111- Write-Host " Signature valid"
112- } else {
113- Write-Host " WARNING: Signature verification failed"
114- }
115- }
74+ # DISABLED: Windows Store will sign the package during submission
75+ # Re-enable these steps when Azure Trusted Signing is configured
76+ # - name: Azure Login for Code Signing
77+ # uses: azure/login@v2
78+ # with:
79+ # client-id: ${{ secrets.AZURE_CLIENT_ID }}
80+ # tenant-id: ${{ secrets.AZURE_TENANT_ID }}
81+ # subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
82+ #
83+ # - name: Sign Windows AppX with Azure Trusted Signing
84+ # uses: azure/trusted-signing-action@v0.5.0
85+ # with:
86+ # endpoint: https://eus.codesigning.azure.net/
87+ # trusted-signing-account-name: Allow2
88+ # certificate-profile-name: Allow2-Dev-Signing
89+ # files-folder: ${{ github.workspace }}/dist
90+ # files-folder-filter: appx,msix
91+ # file-digest: SHA256
92+ # timestamp-rfc3161: http://timestamp.acs.microsoft.com
93+ # timestamp-digest: SHA256
94+
95+ # DISABLED: Signature verification skipped since Windows Store will sign
96+ # - name: Verify Windows signature
97+ # shell: pwsh
98+ # run: |
99+ # Write-Host "=== Verifying AppX/MSIX signatures ==="
100+ #
101+ # # Find signtool
102+ # $signtool = Get-ChildItem -Path "C:\Program Files (x86)\Windows Kits\10\bin" -Recurse -Filter "signtool.exe" |
103+ # Where-Object { $_.FullName -match "x64" } |
104+ # Sort-Object { [version]($_.FullName -replace '.*\\(\d+\.\d+\.\d+\.\d+)\\.*', '$1') } -Descending |
105+ # Select-Object -First 1 -ExpandProperty FullName
106+ #
107+ # Write-Host "Using signtool: $signtool"
108+ #
109+ # # Verify AppX/MSIX signatures
110+ # Get-ChildItem -Path "dist" -Include "*.appx","*.msix" -Recurse | ForEach-Object {
111+ # Write-Host "Verifying: $($_.Name)"
112+ # & $signtool verify /pa $_.FullName
113+ # if ($LASTEXITCODE -eq 0) {
114+ # Write-Host " Signature valid"
115+ # } else {
116+ # Write-Host " WARNING: Signature verification failed"
117+ # }
118+ # }
116119
117120 - name : List built files
118121 shell : pwsh
@@ -218,7 +221,47 @@ jobs:
218221 - name : Build application
219222 run : npm run private:compile
220223
221- - name : Build macOS app (MAS target)
224+ - name : Install provisioning profile
225+ env :
226+ PROVISIONING_PROFILE_BASE64 : ${{ secrets.APPLE_PROVISIONING_PROFILE_BASE64 }}
227+ run : |
228+ if [ -n "$PROVISIONING_PROFILE_BASE64" ]; then
229+ echo "=== Installing Provisioning Profile ==="
230+ echo "$PROVISIONING_PROFILE_BASE64" | base64 -d > "./Allow2Automate_Distribution.provisionprofile"
231+
232+ # Verify the profile was created
233+ if [ -f "./Allow2Automate_Distribution.provisionprofile" ]; then
234+ echo "✅ Provisioning profile written to project root"
235+ ls -la ./Allow2Automate_Distribution.provisionprofile
236+ else
237+ echo "❌ Failed to create provisioning profile"
238+ exit 1
239+ fi
240+
241+ # Also install to system location for electron-builder
242+ mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles
243+
244+ # Extract UUID from profile and install with that name
245+ PROFILE_UUID=$(security cms -D -i "./Allow2Automate_Distribution.provisionprofile" 2>/dev/null | plutil -extract UUID raw - 2>/dev/null || echo "embedded")
246+ if [ "$PROFILE_UUID" != "embedded" ] && [ -n "$PROFILE_UUID" ]; then
247+ cp "./Allow2Automate_Distribution.provisionprofile" ~/Library/MobileDevice/Provisioning\ Profiles/"${PROFILE_UUID}.provisionprofile"
248+ echo "✅ Provisioning profile installed to system location with UUID: ${PROFILE_UUID}"
249+ else
250+ cp "./Allow2Automate_Distribution.provisionprofile" ~/Library/MobileDevice/Provisioning\ Profiles/
251+ echo "✅ Provisioning profile installed to system location"
252+ fi
253+ else
254+ echo "❌ ERROR: APPLE_PROVISIONING_PROFILE_BASE64 secret not set"
255+ echo "Mac App Store build requires a provisioning profile."
256+ echo ""
257+ echo "To create this secret:"
258+ echo "1. Download your provisioning profile from Apple Developer Portal"
259+ echo "2. Base64 encode it: base64 -i Allow2Automate_Distribution.provisionprofile | pbcopy"
260+ echo "3. Add as GitHub secret: APPLE_PROVISIONING_PROFILE_BASE64"
261+ exit 1
262+ fi
263+
264+ - name : Build macOS app (MAS target - Universal)
222265 run : npm run private:build:mac
223266 env :
224267 # Enable code signing if certificates are available
0 commit comments