fix: disable implicit release publishing
This commit is contained in:
+16
-3
@@ -21,6 +21,8 @@ const packageJson = JSON.parse(
|
|||||||
const productName = packageJson.build?.productName ?? packageJson.name
|
const productName = packageJson.build?.productName ?? packageJson.name
|
||||||
const releaseRoot = join(root, 'dist', 'release')
|
const releaseRoot = join(root, 'dist', 'release')
|
||||||
const manifestName = 'release-manifest.json'
|
const manifestName = 'release-manifest.json'
|
||||||
|
const ansiEscapeCharacter = String.fromCharCode(27)
|
||||||
|
const ansiSequenceSuffixPattern = /\[[0-9;]*[A-Za-z]/gu
|
||||||
const supportedArchitectures = new Set(['x64', 'arm64'])
|
const supportedArchitectures = new Set(['x64', 'arm64'])
|
||||||
const platformAliases = new Map([
|
const platformAliases = new Map([
|
||||||
['win', 'windows'],
|
['win', 'windows'],
|
||||||
@@ -204,7 +206,9 @@ function buildElectronBuilderArguments(options, outputDirectory) {
|
|||||||
definition.builderFlag,
|
definition.builderFlag,
|
||||||
...options.formats,
|
...options.formats,
|
||||||
`--${options.arch}`,
|
`--${options.arch}`,
|
||||||
`--config.directories.output=${outputDirectory}`
|
`--config.directories.output=${outputDirectory}`,
|
||||||
|
'--publish',
|
||||||
|
'never'
|
||||||
]
|
]
|
||||||
if (
|
if (
|
||||||
options.platform === 'windows' &&
|
options.platform === 'windows' &&
|
||||||
@@ -635,8 +639,17 @@ if (require.main === module) {
|
|||||||
main().catch((error) => {
|
main().catch((error) => {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
if (process.env.GITHUB_ACTIONS === 'true') {
|
if (process.env.GITHUB_ACTIONS === 'true') {
|
||||||
const details = `${error.message}\n${error.outputTail ?? ''}`
|
const outputLines = String(error.outputTail ?? '')
|
||||||
.slice(-12_000)
|
.replaceAll(ansiEscapeCharacter, '')
|
||||||
|
.replace(ansiSequenceSuffixPattern, '')
|
||||||
|
.replaceAll('\r', '\n')
|
||||||
|
.split('\n')
|
||||||
|
.filter(
|
||||||
|
(line) =>
|
||||||
|
line.trim() &&
|
||||||
|
!line.includes('duplicate dependency references')
|
||||||
|
)
|
||||||
|
const details = `${error.message}\n${outputLines.join('\n').slice(-3_000)}`
|
||||||
.replace(
|
.replace(
|
||||||
/((?:authorization|_authToken|api[_-]?key|password)\s*[:=]\s*)\S+/giu,
|
/((?:authorization|_authToken|api[_-]?key|password)\s*[:=]\s*)\S+/giu,
|
||||||
'$1[redacted]'
|
'$1[redacted]'
|
||||||
|
|||||||
@@ -175,6 +175,8 @@ describe('release build arguments', () => {
|
|||||||
'portable',
|
'portable',
|
||||||
'--arm64',
|
'--arm64',
|
||||||
'--config.directories.output=C:\\release-stage',
|
'--config.directories.output=C:\\release-stage',
|
||||||
|
'--publish',
|
||||||
|
'never',
|
||||||
expect.stringContaining('nsis.artifactName='),
|
expect.stringContaining('nsis.artifactName='),
|
||||||
expect.stringContaining('portable.artifactName=')
|
expect.stringContaining('portable.artifactName=')
|
||||||
])
|
])
|
||||||
|
|||||||
Reference in New Issue
Block a user