📦 Chore: fix some workflow bug

This commit is contained in:
PiEgg
2025-12-08 18:12:55 +08:00
parent 070ce2b666
commit db627a450f
2 changed files with 12 additions and 4 deletions
+9 -1
View File
@@ -60,7 +60,15 @@ const config: Configuration = {
target: [
{
target: 'nsis',
arch: ['x64', 'ia32', 'arm64']
arch: ['x64']
},
{
target: 'nsis',
arch: ['ia32']
},
{
target: 'nsis',
arch: ['arm64']
}
]
},
+3 -3
View File
@@ -117,7 +117,7 @@ const uploadDist = async () => {
try {
const platform = process.platform
if (configList[platform]) {
let versionFileHasUploaded = false
const uploadedVersionFiles = new Set()
for (const [index, config] of configList[platform].entries()) {
const fileName = `${config.appNameWithPrefix}${VERSION}${config.arch}${config.ext}`
const filePath = path.join(distPath, fileName)
@@ -146,7 +146,7 @@ const uploadDist = async () => {
}
// upload version file
if (!versionFileHasUploaded) {
if (!uploadedVersionFiles.has(versionFileName) && fs.existsSync(versionFilePath)) {
const uploadVersionFileToS3 = new Upload({
client,
params: {
@@ -158,7 +158,7 @@ const uploadDist = async () => {
})
console.log('[PicGo Version File] Uploading...', versionFileName)
await uploadVersionFileToS3.done()
versionFileHasUploaded = true
uploadedVersionFiles.add(versionFileName)
console.log('[PicGo Version File] Upload successfully')
}
}