publishPlugin fails with "The plugin archive file cannot be extracted" or 504

Hi there :waving_hand:

Me and my team have noticed a few failures of publishPlugin task recently.

Here is one of it:

The output says:

Execution failed for task ':publishPlugin'. > Failed to upload plugin: Upload failed: The plugin archive file cannot be extracted.

Here is another: [Backport M84] Backport #7654 and #7669 to m84 (#7681) 路 sourcegraph/cody@1c1ea94 路 GitHub
The output says:

> Failed to upload plugin: Upload failed: Failed to upload plugin. Status code 504. <html>
  <head><title>504 Gateway Time-out</title></head>
  <body>
  <center><h1>504 Gateway Time-out</h1></center>
  </body>
  </html>

First, we blamed plugins update but (org.jetbrains.intellij.platform 2.2.1-2.5.0 in particular) but the second failure happened after the revert.

Any ideas on what could it be? Network issue? Some JetBrains server related problem? WDYT?

Thanks for your help!

Kind regards,
Miko艂aj Kondratek

Hej, Miko艂aj! I see you鈥檙e playing in your build script with the way the final build archive is composed.
I鈥檇 start by checking what the publishPlugin.archiveFile points to and what its structure is. By default, it should look similar to: