@@ -86,11 +86,30 @@ jobs:
8686 with :
8787 submodules : recursive
8888
89+ - name : Get Cer for code signing
90+ if : runner.os == 'macOS'
91+ run : base64 -d <<< "$NOTARIZE_P8_BASE64" > /tmp/notary-key.p8
92+ shell : bash
93+ env :
94+ NOTARIZE_P8_BASE64 : ${{ secrets.NOTARIZE_P8_BASE64 }}
95+
96+ - uses : apple-actions/import-codesign-certs@v2
97+ continue-on-error : true
98+ if : runner.os == 'macOS'
99+ with :
100+ p12-file-base64 : ${{ secrets.CODE_SIGN_P12_BASE64 }}
101+ p12-password : ${{ secrets.CODE_SIGN_P12_PASSWORD }}
102+
89103 - name : Install choco on Windows
90104 if : runner.os == 'Windows'
91105 run : |
92106 choco install make pkgconfiglite ccache awscli 7zip ninja -y
93107
108+ - uses : actions/setup-dotnet@v3
109+ if : runner.os == 'Windows'
110+ with :
111+ dotnet-version : " 8.0.x"
112+
94113 - name : Download ccache from s3
95114 if : runner.os == 'Windows'
96115 continue-on-error : true
@@ -117,7 +136,54 @@ jobs:
117136 run : |
118137 cd engine
119138 make pre-package
120-
139+
140+ - name : Code Signing binaries
141+ run : |
142+ cd engine
143+ make codesign-binary CODE_SIGN=true DEVELOPER_ID="${{ secrets.DEVELOPER_ID }}" AZURE_KEY_VAULT_URI="${{ secrets.AZURE_KEY_VAULT_URI }}" AZURE_CLIENT_ID="${{ secrets.AZURE_CLIENT_ID }}" AZURE_TENANT_ID="${{ secrets.AZURE_TENANT_ID }}" AZURE_CLIENT_SECRET="${{ secrets.AZURE_CLIENT_SECRET }}" AZURE_CERT_NAME="${{ secrets.AZURE_CERT_NAME }}"
144+
145+ - name : Notary macOS Binary
146+ if : runner.os == 'macOS'
147+ run : |
148+ curl -sSfL https://raw.githubusercontent.com/anchore/quill/main/install.sh | sh -s -- -b /usr/local/bin
149+ cd engine/cortex
150+ # Notarize the binary
151+ quill notarize ./cortex
152+ env :
153+ QUILL_NOTARY_KEY_ID : ${{ secrets.NOTARY_KEY_ID }}
154+ QUILL_NOTARY_ISSUER : ${{ secrets.NOTARY_ISSUER }}
155+ QUILL_NOTARY_KEY : " /tmp/notary-key.p8"
156+
157+ - name : Build Installers
158+ shell : bash
159+ run : |
160+ cd engine
161+ make build-installer PACKAGE_NAME=cortexcpp-nightly VERSION=${{ needs.get-update-version.outputs.new_version }} SOURCE_BINARY_PATH="../../cortex/cortex" DESTINATION_BINARY_NAME="cortex-nightly" DATA_FOLDER_NAME=".cortex-nightly" CONFIGURATION_FILE_NAME=".cortexrc-nightly" UNINSTALLER_FILE_NAME="cortex-nightly-uninstall.sh"
162+
163+ - name : Codesign and notary for macos installer
164+ if : runner.os == 'macOS'
165+ run : |
166+ cd engine
167+ productsign --sign "Developer ID Installer: ${{ secrets.DEVELOPER_ID }}" cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}-signed.pkg
168+ rm cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg
169+ mv cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}-signed.pkg cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg
170+ xcrun notarytool submit cortexcpp-nightly-${{ needs.get-update-version.outputs.new_version }}.pkg --apple-id ${{ secrets.APPLE_ID }} --password ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} --team-id ${{ secrets.APPLE_TEAM_ID }} --wait
171+
172+ - name : Compile .ISS to .EXE Installer
173+ uses :
Minionguyjpro/[email protected] 174+ if : runner.os == 'Windows'
175+ with :
176+ path : engine/templates/windows/installer-nightly.iss
177+ options : /O+
178+
179+ - name : Codesign for windows installer
180+ if : runner.os == 'Windows'
181+ run : |
182+ cd engine
183+ dotnet tool install --global AzureSignTool
184+ set PATH=%PATH%;%USERPROFILE%\.dotnet\tools
185+ azuresigntool.exe sign -kvu ${{ secrets.AZURE_KEY_VAULT_URI }} -kvi ${{ secrets.AZURE_CLIENT_ID }} -kvt ${{ secrets.AZURE_TENANT_ID }} -kvs ${{ secrets.AZURE_CLIENT_SECRET }} -kvc ${{ secrets.AZURE_CERT_NAME }} -tr http://timestamp.globalsign.com/tsa/r6advanced1 -v ".\templates\windows\setup.exe";'
186+
121187 - name : Package
122188 run : |
123189 cd engine
@@ -129,6 +195,27 @@ jobs:
129195 name : cortex-${{ matrix.os }}-${{ matrix.name }}
130196 path : ./engine/cortex
131197
198+ - name : Upload windwos installer
199+ if : runner.os == 'Windows'
200+ uses : actions/upload-artifact@v2
201+ with :
202+ name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
203+ path : ./engine/templates/windows/setup.exe
204+
205+ - name : Upload macos installer
206+ if : runner.os == 'macOS'
207+ uses : actions/upload-artifact@v2
208+ with :
209+ name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
210+ path : ./engine/cortexcpp-nightly.pkg
211+
212+ - name : Upload linux installer
213+ if : runner.os == 'Linux'
214+ uses : actions/upload-artifact@v2
215+ with :
216+ name : cortex-${{ matrix.os }}-installer-${{ matrix.name }}
217+ path : ./engine/cortexcpp-nightly.deb
218+
132219 - name : Upload ccache to s3
133220 continue-on-error : true
134221 if : always() && runner.os == 'Windows'
0 commit comments