diff options
-rw-r--r-- | .github/workflows/ferdi-builds.yml | 2 | ||||
-rw-r--r-- | build-helpers/notarize.js | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/.github/workflows/ferdi-builds.yml b/.github/workflows/ferdi-builds.yml index fc87275c4..74defe01e 100644 --- a/.github/workflows/ferdi-builds.yml +++ b/.github/workflows/ferdi-builds.yml | |||
@@ -107,6 +107,7 @@ jobs: | |||
107 | echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV | 107 | echo "ELECTRON_CACHE=$HOME/.cache/electron" >> $GITHUB_ENV |
108 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV | 108 | echo "ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder" >> $GITHUB_ENV |
109 | echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV | 109 | echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV |
110 | echo "SKIP_NOTARIZATION=${{ !contains(github.repository_owner, 'getferdi') }}" >> $GITHUB_ENV | ||
110 | - name: Set env vars for Windows | 111 | - name: Set env vars for Windows |
111 | if: startsWith(runner.os, 'Windows') | 112 | if: startsWith(runner.os, 'Windows') |
112 | run: | | 113 | run: | |
@@ -115,6 +116,7 @@ jobs: | |||
115 | echo "ELECTRON_CACHE=$USERPROFILE\.cache\electron" >> $GITHUB_ENV | 116 | echo "ELECTRON_CACHE=$USERPROFILE\.cache\electron" >> $GITHUB_ENV |
116 | echo "ELECTRON_BUILDER_CACHE=$USERPROFILE\.cache\electron-builder" >> $GITHUB_ENV | 117 | echo "ELECTRON_BUILDER_CACHE=$USERPROFILE\.cache\electron-builder" >> $GITHUB_ENV |
117 | echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV | 118 | echo "FORCE_REBUILD_ON_NIGHTLY=${{ contains(github.event.inputs.message, 'force build') && contains(github.event.inputs.message, 'nightly branch') }}" >> $GITHUB_ENV |
119 | echo "SKIP_NOTARIZATION=${{ !contains(github.repository_owner, 'getferdi') }}" >> $GITHUB_ENV | ||
118 | shell: bash | 120 | shell: bash |
119 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch | 121 | - name: Checkout code along with submodules for the 'nightly' branch if the trigger event is 'scheduled' or this is a forced rebuild on the nightly branch |
120 | uses: actions/checkout@v2 | 122 | uses: actions/checkout@v2 |
diff --git a/build-helpers/notarize.js b/build-helpers/notarize.js index d5a6027fb..1d9302880 100644 --- a/build-helpers/notarize.js +++ b/build-helpers/notarize.js | |||
@@ -1,18 +1,18 @@ | |||
1 | const { notarize } = require("electron-notarize"); | 1 | const { notarize } = require('electron-notarize'); |
2 | 2 | ||
3 | exports.default = async function notarizing(context) { | 3 | exports.default = async function notarizing(context) { |
4 | const { electronPlatformName, appOutDir } = context; | 4 | const { electronPlatformName, appOutDir } = context; |
5 | if (electronPlatformName !== "darwin" || (process.env.GIT_BRANCH_NAME !== 'release' && process.env.GIT_BRANCH_NAME !== 'nightly')) { | 5 | if (electronPlatformName !== 'darwin' || process.env.SKIP_NOTARIZATION === 'true' || (process.env.GIT_BRANCH_NAME !== 'release' && process.env.GIT_BRANCH_NAME !== 'nightly')) { |
6 | return; | 6 | return; |
7 | } | 7 | } |
8 | 8 | ||
9 | const appName = context.packager.appInfo.productFilename; | 9 | const appName = context.packager.appInfo.productFilename; |
10 | 10 | ||
11 | return await notarize({ | 11 | await notarize({ |
12 | appBundleId: "com.kytwb.ferdi", | 12 | appBundleId: 'com.kytwb.ferdi', |
13 | appPath: `${appOutDir}/${appName}.app`, | 13 | appPath: `${appOutDir}/${appName}.app`, |
14 | ascProvider: "B6J9X9DWFL", | 14 | ascProvider: 'B6J9X9DWFL', |
15 | appleId: process.env.APPLEID, | 15 | appleId: process.env.APPLEID, |
16 | appleIdPassword: process.env.APPLEID_PASSWORD | 16 | appleIdPassword: process.env.APPLEID_PASSWORD, |
17 | }); | 17 | }); |
18 | }; | 18 | }; |