Skip to content

Commit

Permalink
新增:MacOS 打包使用官方证书
Browse files Browse the repository at this point in the history
  • Loading branch information
modstart committed Jan 21, 2025
1 parent 03faa6e commit 05a2db2
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 3 deletions.
16 changes: 15 additions & 1 deletion .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,21 @@ jobs:
echo "find-identity"
security find-identity -p codesigning
echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
security import certificate.p12 -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security create-keychain -p "" build.keychain
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security list-keychains -s build.keychain
security set-keychain-settings -t 3600 -u build.keychain
security unlock-keychain -p "" build.keychain
echo "find-identity"
security find-identity -v -p codesigning build.keychain
echo "find-identity"
security find-identity -p codesigning
echo "set-key-partition-list"
security set-key-partition-list -S apple-tool:,apple: -s -k "" -l "Mac Developer ID Application: Xi'an Yanyi Information Technology Co., Ltd" -t private build.keychain
echo "find-certificate"
security export -k build.keychain -t certs -f x509 -p -o certificate.cer
echo "add-trusted-cert"
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certificate.cer
echo "find-identity"
security find-identity -p codesigning
Expand Down
16 changes: 15 additions & 1 deletion .github/workflows/tag-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,21 @@ jobs:
echo "find-identity"
security find-identity -p codesigning
echo "$MACOS_CERTIFICATE" | base64 --decode > certificate.p12
security import certificate.p12 -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security create-keychain -p "" build.keychain
security import certificate.p12 -k build.keychain -P "$MACOS_CERTIFICATE_PASSWORD" -T /usr/bin/codesign
security list-keychains -s build.keychain
security set-keychain-settings -t 3600 -u build.keychain
security unlock-keychain -p "" build.keychain
echo "find-identity"
security find-identity -v -p codesigning build.keychain
echo "find-identity"
security find-identity -p codesigning
echo "set-key-partition-list"
security set-key-partition-list -S apple-tool:,apple: -s -k "" -l "Mac Developer ID Application: Xi'an Yanyi Information Technology Co., Ltd" -t private build.keychain
echo "find-certificate"
security export -k build.keychain -t certs -f x509 -p -o certificate.cer
echo "add-trusted-cert"
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain certificate.cer
echo "find-identity"
security find-identity -p codesigning
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "focusany",
"version": "0.5.0",
"version": "0.6.0-beta",
"main": "dist-electron/main/index.js",
"description": "FocusAny",
"author": "ModStartLib",
Expand Down

0 comments on commit 05a2db2

Please sign in to comment.