File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/Drivers/Electron/Updater Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 114114 'token ' => env ('GITHUB_TOKEN ' ),
115115 'vPrefixedTagName ' => env ('GITHUB_V_PREFIXED_TAG_NAME ' , true ),
116116 'private ' => env ('GITHUB_PRIVATE ' , false ),
117+ 'autoupdate_token ' => env ('GITHUB_AUTOUPDATE_TOKEN ' ), // Read-only token used by the updater for private repos
117118 'channel ' => env ('GITHUB_CHANNEL ' , 'latest ' ),
118119 'releaseType ' => env ('GITHUB_RELEASE_TYPE ' , 'draft ' ),
119120 ],
Original file line number Diff line number Diff line change @@ -17,15 +17,20 @@ public function environmentVariables(): array
1717
1818 public function builderOptions (): array
1919 {
20- return [
20+ $ options = [
2121 'provider ' => 'github ' ,
2222 'repo ' => $ this ->config ['repo ' ],
2323 'owner ' => $ this ->config ['owner ' ],
2424 'vPrefixedTagName ' => $ this ->config ['vPrefixedTagName ' ],
2525 'private ' => $ this ->config ['private ' ],
2626 'channel ' => $ this ->config ['channel ' ],
2727 'releaseType ' => $ this ->config ['releaseType ' ],
28- 'token ' => $ this ->config ['token ' ],
2928 ];
29+
30+ if ($ this ->config ['private ' ] === true && ! empty ($ this ->config ['autoupdate_token ' ])) {
31+ $ options ['token ' ] = $ this ->config ['autoupdate_token ' ];
32+ }
33+
34+ return $ options ;
3035 }
3136}
You can’t perform that action at this time.
0 commit comments