-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -142,14 +142,19 @@ jobs: | |
|
||
- name: Build Electron app (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
for var in APPLEID APPLEIDPASS APPLETEAMID CSC_LINK CSC_KEY_PASSWORD CSC_INSTALLER_LINK CSC_INSTALLER_KEY_PASSWORD; do | ||
test -n "${!var}" || unset $var | ||
done | ||
npm run build:app -- -- -- \ | ||
dmg pkg \ | ||
--publish never \ | ||
--${{ matrix.arch }} | ||
uses: nick-fields/retry@v3 | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 3 | ||
retry_on: any | ||
command: | | ||
for var in APPLEID APPLEIDPASS APPLETEAMID CSC_LINK CSC_KEY_PASSWORD CSC_INSTALLER_LINK CSC_INSTALLER_KEY_PASSWORD; do | ||
test -n "${!var}" || unset $var | ||
done | ||
npm run build:app -- -- -- \ | ||
dmg pkg \ | ||
--publish never \ | ||
--${{ matrix.arch }} | ||
env: | ||
APPLEID: ${{ secrets.APPLEID }} | ||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | ||
|
@@ -161,18 +166,23 @@ jobs: | |
|
||
- name: Notarize PKG (macOS) | ||
if: runner.os == 'macOS' | ||
run: | | ||
if [[ -n $APPLEID && -n $APPLEIDPASS && -n $APPLETEAMID ]]; then | ||
pkgname=$(ls -1 freelens/dist/Freelens*.pkg | head -n1) | ||
auth="--apple-id $APPLEID --password $APPLEIDPASS --team-id $APPLETEAMID" | ||
xcrun notarytool submit $pkgname $auth --wait 2>&1 | tee freelens/dist/notarytool.log | ||
uuid=$(awk '/id: / { print $2; exit; }' freelens/dist/notarytool.log) | ||
sleep 60 | ||
if [[ -n $uuid ]]; then | ||
xcrun notarytool log $uuid $auth | ||
xcrun stapler staple $pkgname | ||
uses: nick-fields/retry@v3 | ||
with: | ||
timeout_minutes: 20 | ||
max_attempts: 3 | ||
retry_on: any | ||
command: | | ||
if [[ -n $APPLEID && -n $APPLEIDPASS && -n $APPLETEAMID ]]; then | ||
pkgname=$(ls -1 freelens/dist/Freelens*.pkg | head -n1) | ||
auth="--apple-id $APPLEID --password $APPLEIDPASS --team-id $APPLETEAMID" | ||
xcrun notarytool submit $pkgname $auth --wait 2>&1 | tee freelens/dist/notarytool.log | ||
uuid=$(awk '/id: / { print $2; exit; }' freelens/dist/notarytool.log) | ||
sleep 60 | ||
if [[ -n $uuid ]]; then | ||
xcrun notarytool log $uuid $auth | ||
xcrun stapler staple $pkgname | ||
fi | ||
fi | ||
fi | ||
env: | ||
APPLEID: ${{ secrets.APPLEID }} | ||
APPLEIDPASS: ${{ secrets.APPLEIDPASS }} | ||
|
@@ -201,6 +211,19 @@ jobs: | |
CSC_LINK: ${{ secrets.WIN_CSC_LINK }} | ||
CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} | ||
|
||
- name: Azure Trusted Signing (Windows x64) | ||
if: runner.os == 'Windows' && matrix.arch == 'x64' && github.ref_name == 'main' && github.event_name != 'pull_request' | ||
uses: azure/[email protected] | ||
with: | ||
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }} | ||
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }} | ||
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }} | ||
endpoint: ${{ vars.AZURE_ENDPOINT }} | ||
trusted-signing-account-name: ${{ vars.AZURE_CODE_SIGNING_NAME }} | ||
certificate-profile-name: ${{ vars.AZURE_CERT_PROFILE_NAME }} | ||
files-folder: ${{ github.workspace }}\freelens\dist | ||
files-folder-filter: exe,msi | ||
|
||
- name: Tweak binaries | ||
shell: bash | ||
run: | | ||
|