diff --git a/.github/workflows/buid_arch.yml b/.github/workflows/buid_arch.yml index 11ed44c3..00a8cc87 100644 --- a/.github/workflows/buid_arch.yml +++ b/.github/workflows/buid_arch.yml @@ -314,10 +314,9 @@ jobs: run: | if [ "${{ github.event.inputs.publish_enabled }}" == "false" ]; then echo "Publishing is disabled. Skipping upload to S3." - node scripts/upload-to-s3.js ./artifacts ./dist_electron/combined exit 0 fi - node scripts/upload-to-s3.js ./artifacts ./dist_electron/combined false + node scripts/upload-to-s3.js ./artifacts ./dist_electron/combined env: R2_SECRET_ID: ${{ secrets.R2_SECRET_ID }} R2_SECRET_KEY: ${{ secrets.R2_SECRET_KEY }} diff --git a/scripts/upload-to-s3.js b/scripts/upload-to-s3.js index c302460a..2ce39011 100644 --- a/scripts/upload-to-s3.js +++ b/scripts/upload-to-s3.js @@ -21,7 +21,6 @@ const ymlFileList = ['latest-mac.yml', 'latest.yml', 'latest-linux.yml', 'latest const args = process.argv.slice(2) const exePath = args[0] || './artifacts' const ymlPath = args[1] || './dist_electron/combined' -const idDev = args[2] ?? true const S3Options = { credentials: { @@ -52,18 +51,7 @@ const uploadFile = async filePath => { uploadDistToS3.on('httpUploadProgress', progress => { console.log(`[INFO]: ${path.basename(filePath)} - ${progress.loaded}/${progress.total}`) }) - if (idDev) { - console.log('[DEV]: upload params:', { - Bucket: bucket, - Key: `${folder}${path.basename(filePath)}`, - Body: '<>', - ContentType: path.basename(filePath).endsWith('.yml') - ? mime.getType(path.basename(filePath)) - : 'application/octet-stream', - }) - } else { - await uploadDistToS3.done() - } + await uploadDistToS3.done() } else { console.warn('[Warn] File not found:', filePath) }