@@ -13,11 +13,11 @@ jobs:
1313 steps :
1414 - name : Checkout Repository
1515 uses : actions/checkout@v2
16+
1617 - name : Install codesign certificate
1718 env :
1819 # DEV_CERT_B64: Base64-encoded developer certificate as .p12
1920 # DEV_CERT_PWD: Developer certificate .p12 password
20- # PROVISION_PROFILE_B64: Base64-encoded provisioning profile as .provisionprofile
2121 # KEYCHAIN_TIMEOUT: Lock keychain after timeout interval
2222 # https://docs.github.com/en/actions/deployment/deploying-xcode-applications/installing-an-apple-certificate-on-macos-runners-for-xcode-development
2323 DEV_CERT_B64 : ${{ secrets.DEV_CERT_B64 }}
@@ -33,53 +33,54 @@ jobs:
3333 echo -n "$DEV_CERT_B64" | base64 --decode --output "$DEV_CERT_P12"
3434 security import "$DEV_CERT_P12" -P "$DEV_CERT_PWD" -A -t cert -f pkcs12 -k "$KEYCHAIN_DB"
3535 security list-keychain -d user -s "$KEYCHAIN_DB"
36+
3637 - name : Building
3738 run : |
3839 swift build -c release --arch arm64 --arch x86_64
39- # CODESIGN & NOTARIZE THE BINARY
40+
4041 - name : Sign
4142 env :
4243 CODESIGN_SIGN : ${{ secrets.CODESIGN_SIGN }}
4344 run : |
4445 security find-identity -p basic -v
4546 codesign --sign "$CODESIGN_SIGN" --prefix austincondiff.CodeEdit. --options=runtime --verbose --timestamp .build/apple/Products/Release/codeedit-cli
47+
4648 - name : Zip
4749 run : zip -r .build/apple/Products/Release/codeedit-cli.zip .build/apple/Products/Release/codeedit-cli
50+
4851 - name : Notarize
4952 env :
5053 APPLE_ID : ${{ secrets.APPLE_ID }}
5154 APPLE_ID_PWD : ${{ secrets.APPLE_ID_PWD }}
5255 APPLE_TEAM_ID : ${{ secrets.APPLE_TEAM_ID }}
5356 run : |
5457 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"
5958 status=`/usr/libexec/PlistBuddy -c "Print :status" "NotarizationResponse.plist"`
6059 if [[ $status != "Accepted" ]]; then
6160 exit 999
6261 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+
8384 - name : Clean up keychain
8485 if : ${{ always() }}
8586 run : |
0 commit comments