@@ -13,11 +13,11 @@ jobs:
13
13
steps :
14
14
- name : Checkout Repository
15
15
uses : actions/checkout@v2
16
+
16
17
- name : Install codesign certificate
17
18
env :
18
19
# DEV_CERT_B64: Base64-encoded developer certificate as .p12
19
20
# DEV_CERT_PWD: Developer certificate .p12 password
20
- # PROVISION_PROFILE_B64: Base64-encoded provisioning profile as .provisionprofile
21
21
# KEYCHAIN_TIMEOUT: Lock keychain after timeout interval
22
22
# https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
23
23
DEV_CERT_B64 : ${{ secrets.DEV_CERT_B64 }}
@@ -33,53 +33,54 @@ jobs:
33
33
echo -n "$DEV_CERT_B64" | base64 --decode --output "$DEV_CERT_P12"
34
34
security import "$DEV_CERT_P12" -P "$DEV_CERT_PWD" -A -t cert -f pkcs12 -k "$KEYCHAIN_DB"
35
35
security list-keychain -d user -s "$KEYCHAIN_DB"
36
+
36
37
- name : Building
37
38
run : |
38
39
swift build -c release --arch arm64 --arch x86_64
39
- # CODESIGN & NOTARIZE THE BINARY
40
+
40
41
- name : Sign
41
42
env :
42
43
CODESIGN_SIGN : ${{ secrets.CODESIGN_SIGN }}
43
44
run : |
44
45
security find-identity -p basic -v
45
46
codesign --sign "$CODESIGN_SIGN" --prefix austincondiff.CodeEdit. --options=runtime --verbose --timestamp .build/apple/Products/Release/codeedit-cli
47
+
46
48
- name : Zip
47
49
run : zip -r .build/apple/Products/Release/codeedit-cli.zip .build/apple/Products/Release/codeedit-cli
50
+
48
51
- name : Notarize
49
52
env :
50
53
APPLE_ID : ${{ secrets.APPLE_ID }}
51
54
APPLE_ID_PWD : ${{ secrets.APPLE_ID_PWD }}
52
55
APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
53
56
run : |
54
57
xcrun notarytool submit ".build/apple/Products/Release/codeedit-cli.zip" --apple-id "$APPLE_ID" --password "$APPLE_ID_PWD" --team-id "$APPLE_TEAM_ID" --verbose --wait --output-format plist > "NotarizationResponse.plist"
55
- echo "**RESPONSE**"
56
- cat NotarizationResponse.plist
57
- id=`/usr/libexec/PlistBuddy -c "Print :id" "NotarizationResponse.plist"`
58
- xcrun notarytool log --verbose --apple-id "$APPLE_ID" --password "$APPLE_ID_PWD" --team-id "$APPLE_TEAM_ID" "$id"
59
58
status=`/usr/libexec/PlistBuddy -c "Print :status" "NotarizationResponse.plist"`
60
59
if [[ $status != "Accepted" ]]; then
61
60
exit 999
62
61
fi
63
- # - name: Create Release
64
- # id: create_release
65
- # uses: actions/create-release@v1
66
- # env:
67
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68
- # with:
69
- # tag_name: ${{ github.ref }}
70
- # release_name: ${{ github.ref }}
71
- # draft: false
72
- # prerelease: false
73
-
74
- # - name: Upload Release Asset
75
- # uses: actions/upload-release-asset@v1
76
- # env:
77
- # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
78
- # with:
79
- # upload_url: ${{ steps.create_release.outputs.upload_url }}
80
- # asset_path: .build/apple/Products/Release/codeedit-cli.zip
81
- # asset_name: codeedit-cli-binary.zip
82
- # asset_content_type: application/zip
62
+
63
+ - name : Create Release
64
+ id : create_release
65
+ uses : actions/create-release@v1
66
+ env :
67
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
68
+ with :
69
+ tag_name : ${{ github.ref }}
70
+ release_name : ${{ github.ref }}
71
+ draft : false
72
+ prerelease : false
73
+
74
+ - name : Upload Release Asset
75
+ uses : actions/upload-release-asset@v1
76
+ env :
77
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
78
+ with :
79
+ upload_url : ${{ steps.create_release.outputs.upload_url }}
80
+ asset_path : .build/apple/Products/Release/codeedit-cli.zip
81
+ asset_name : codeedit-cli-universal-binary.zip
82
+ asset_content_type : application/zip
83
+
83
84
- name : Clean up keychain
84
85
if : ${{ always() }}
85
86
run : |
0 commit comments