Skip to content

Commit

Permalink
Add steps to sign win binary
Browse files Browse the repository at this point in the history
  • Loading branch information
pankaj443 committed May 17, 2024
1 parent 123be07 commit 6363eb8
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 36 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/executable_mac.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build Executables
on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]
jobs:
lint:
name: Build Executables
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/executable_win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ jobs:
- name: Sign binary
uses: lando/code-sign-action@v2
with:
file: path/to/binary
file: percy.exe
certificate-data: ${{ secrets.WINDOWS_CERT }}
certificate-password: ${{ secrets.WINDOWS_CERT_KEY }}
# env:
# APPLE_DEV_CERT: ${{secrets.APPLE_DEV_CERT}}
# APPLE_ID_USERNAME: ${{secrets.APPLE_ID_USERNAME}}
# APPLE_ID_KEY: ${{secrets.APPLE_ID_KEY}}
# - name: Verify executable
# run: ./percy --version
# - name: Upload assets
Expand Down
2 changes: 0 additions & 2 deletions scripts/executable_mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ pkg ./packages/cli/bin/run.js -d
# Rename executables
mv run-linux percy && chmod +x percy
mv run-macos percy-osx && chmod +x percy-osx
# mv run-win.exe percy.exe && chmod +x percy.exe

# Sign & Notrize mac app
echo "$APPLE_DEV_CERT" | base64 -d > AppleDevIDApp.p12
Expand All @@ -69,7 +68,6 @@ codesign --force --verbose=4 -s "Developer ID Application: BrowserStack Inc (76
zip percy-linux.zip percy
mv percy-osx percy
zip percy-osx.zip percy
# zip percy-win.zip percy.exe

xcrun notarytool submit --apple-id "$APPLE_ID_USERNAME" --password $APPLE_ID_KEY --team-id 763K6K6H44 percy-osx.zip --wait

Expand Down
27 changes: 1 addition & 26 deletions scripts/executable_win.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ set -e -o pipefail

function cleanup {
rm -rf build
# rm AppleDevIDApp.p12
# security delete-keychain percy.keychain
}

brew install gnu-sed
Expand Down Expand Up @@ -47,30 +45,7 @@ cp -R ./build/* packages/
# Create executables
pkg ./packages/cli/bin/run.js -d

# # Rename executables
# mv run-linux percy && chmod +x percy
# mv run-macos percy-osx && chmod +x percy-osx
# Rename executables
mv run-win.exe percy.exe && chmod +x percy.exe

# # Sign & Notrize mac app
# echo "$APPLE_DEV_CERT" | base64 -d > AppleDevIDApp.p12

# security create-keychain -p percy percy.keychain
# security import AppleDevIDApp.p12 -t agg -k percy.keychain -P ChaiTime -A
# security list-keychains -s ~/Library/Keychains/percy.keychain
# security default-keychain -s ~/Library/Keychains/percy.keychain
# security unlock-keychain -p "percy" ~/Library/Keychains/percy.keychain
# security set-keychain-settings -t 3600 -l ~/Library/Keychains/percy.keychain
# security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k percy ~/Library/Keychains/percy.keychain-db

# codesign --force --verbose=4 -s "Developer ID Application: BrowserStack Inc (763K6K6H44)" --options runtime --entitlements scripts/files/entitlement.plist --keychain ~/Library/Keychains/percy.keychain percy-osx

# # Create zip file for uploading as assets
# zip percy-linux.zip percy
# mv percy-osx percy
# zip percy-osx.zip percy
# zip percy-win.zip percy.exe

# xcrun notarytool submit --apple-id "$APPLE_ID_USERNAME" --password $APPLE_ID_KEY --team-id 763K6K6H44 percy-osx.zip --wait

cleanup

0 comments on commit 6363eb8

Please sign in to comment.