build: add release config/dsymutil fix, test-releases for GHA (#42350)

* build: add publishing workflow for GHActions

* build: add test repo/bucket for uploads

* build: clean up conditionals, add macos-14-large, review comments

* build: remove host_cpu var from GCLIENT_EXTRA_ARGS

* build: use GN_CONFIG

* remove: hardcode release gn config

* Fix GN args import for release

* Use BUILD_TOOLS_SHA when cloning build-tools in test

* build: create test release in prepare-release

* build: fix GN_CONFIG for mas builds

* Fix dsymutil arch resetting

---------

Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
This commit is contained in:
Keeley Hammond 2024-06-03 11:43:54 -07:00 committed by GitHub
parent 361b37592a
commit 5f8a490a00
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 54 additions and 7 deletions

View file

@ -17,7 +17,6 @@ const bumpType = args._[0];
const targetRepo = getRepo();
function getRepo () {
if (process.env.IS_GHA_RELEASE) return 'test-releases';
return bumpType === 'nightly' ? 'nightlies' : 'electron';
}
@ -128,7 +127,23 @@ async function createRelease (branchToTarget, isBeta) {
process.exit(1);
});
const ghaTestRelease = await octokit.repos.createRelease({
owner: 'electron',
repo: 'test-releases',
tag_name: newVersion,
draft: true,
name: `electron ${newVersion}`,
body: releaseBody,
prerelease: releaseIsPrelease,
target_commitish: newVersion.includes('nightly') ? 'main' : branchToTarget
}).catch(err => {
console.log(`${fail} Error creating new GHA test release: `, err);
});
console.log(`Release has been created with id: ${release.data.id}.`);
if (ghaTestRelease && ghaTestRelease.data) {
console.log(`Test Release has been created with id: ${ghaTestRelease.data.id}.`);
}
console.log(`${pass} Draft release for ${newVersion} successful.`);
}