Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
GarboMuffin committed Jan 22, 2024
1 parent c1f0b0e commit 0b5b71e
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ jobs:
if: runner.os == 'macOS'
run: |
node release-automation/build.js --mac --universal
env:
USE_HARD_LINKS: "false"
- name: Package Linux
if: runner.os == 'Linux'
run: |
Expand All @@ -52,3 +54,5 @@ jobs:
node release-automation/build.js --appimage --x64
node release-automation/build.js --appimage --armv7l
node release-automation/build.js --appimage --arm64
env:
USE_HARD_LINKS: "false"
24 changes: 17 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,13 @@ jobs:
- name: Package Windows
if: runner.os == 'Windows'
run: |
node release-automation/build.js --production --windows
node release-automation/build.js --production --windows-legacy
node release-automation/build.js --production --microsoft-store
node release-automation/build.js --windows --x64 --production
node release-automation/build.js --windows --ia32 --production
node release-automation/build.js --windows --arm64 --production
node release-automation/build.js --windows-legacy --x64 --production
node release-automation/build.js --microsoft-store --x64 --production
node release-automation/build.js --microsoft-store --ia32 --production
node release-automation/build.js --microsoft-store --arm64 --production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Microsoft Store Artifact
Expand All @@ -51,7 +55,7 @@ jobs:
- name: Package macOS
if: runner.os == 'macOS'
run: |
node release-automation/build.js --production --mac
node release-automation/build.js --mac --universal --production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: "false"
Expand All @@ -63,9 +67,15 @@ jobs:
- name: Package Linux
if: runner.os == 'Linux'
run: |
node release-automation/build.js --production --debian
node release-automation/build.js --production --tarball
node release-automation/build.js --production --appimage
node release-automation/build.js --debian --x64 --production
node release-automation/build.js --debian --armv7l --production
node release-automation/build.js --debian --arm64 --production
node release-automation/build.js --tarball --x64 --production
node release-automation/build.js --tarball --armv7l --production
node release-automation/build.js --tarball --arm64 --production
node release-automation/build.js --appimage --x64 --production
node release-automation/build.js --appimage --armv7l --production
node release-automation/build.js --appimage --arm64 --production
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
USE_HARD_LINKS: "false"
2 changes: 1 addition & 1 deletion release-automation/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ These are the bespoke scripts that we use to automate various aspects of releasi

## build.js

This is what creates most of the downloads that are up on our website and on GitHub.
This is what creates most of the downloads that are up on our website and on GitHub. Each run of the build script will generate one file, so if you want to package as multiple things, you'll have to run it multiple times. Doing multiple builds concurrently won't work; just run one at a time.

You must specify which type of file you want to build:

Expand Down
11 changes: 6 additions & 5 deletions release-automation/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const getPublish = () => process.env.GH_TOKEN ? ({
/**
* Recursively copy properties from newValues to resultInPlace, in place.
* Properties in resultInPlcae but not in newValues are left unchanged.
* @param {object} resultInPlace
* @param {object} resultInPlace
* @param {object} newValues
*/
const applyExtraProperties = (resultInPlace, newValues) => {
Expand Down Expand Up @@ -89,6 +89,7 @@ const build = ({
}

applyExtraProperties(config, extraConfig);
console.log(config);

return builder.build({
targets: target,
Expand Down Expand Up @@ -176,13 +177,13 @@ const buildMac = () => build({
console.log('Not notarizing: not --production');
return;
}

const {electronPlatformName, appOutDir} = context;
if (electronPlatformName !== 'darwin') {
console.log('Not notarizing: not macOS');
return;
}

const appleId = process.env.APPLE_ID_USERNAME
const appleIdPassword = process.env.APPLE_ID_PASSWORD;
const teamId = process.env.APPLE_TEAM_ID;
Expand All @@ -198,11 +199,11 @@ const buildMac = () => build({
console.log('Not notarizing: no APPLE_TEAM_ID');
return;
}

console.log('Sending app to Apple for notarization, this will take a while...');
const appId = packageJSON.build.appId;
const appPath = `${appOutDir}/${context.packager.appInfo.productFilename}.app`;

return await electronNotarize.notarize({
tool: 'notarytool',
appBundleId: appId,
Expand Down

0 comments on commit 0b5b71e

Please sign in to comment.