electron / forge

:electron: A complete tool for building and publishing Electron applications
https://electronforge.io
MIT License
6.49k stars 519 forks source link

Publish release without rebuilding #582

Closed just-paja closed 6 years ago

just-paja commented 6 years ago

Is it possible to publish artifacts without having to rebuild everything? I'm trying to just take all the artifacts as built on CI and shove them up the Microsoft GitHub release.

Still using version 5

What command line arguments are you passing?

electron-forge publish --auth-token {theToken}

Naturally, when I run the command, it fails on me because it is already running on a different "machine", one that does not have capabilities to build packages.

This is how the build flow looks like: build-flow

What does your config.forge data in package.json look like?

"config": {
    "forge": {
      "make_targets": {
        "win32": [
          "squirrel"
        ],
        "darwin": [
          "zip"
        ],
        "linux": [
          "deb",
          "rpm"
        ]
      },
      "electronPackagerConfig": {
        "packageManager": "npm",
        "asar": true
      },
      "electronWinstallerConfig": {
        "name": "radio_drama_soundboard"
      },
      "electronInstallerDebian": {},
      "electronInstallerRedhat": {},
      "github_repository": {
        "owner": "just-paja",
        "name": "radio-drama-soundboard"
      },
      "windowsStoreConfig": {
        "packageName": "",
        "name": "radiodramasoundboard"
      }
    }
  }
MarshallOfSound commented 6 years ago

@just-paja Yes, we have built-in support for this.

# This will make the artifacts and not publish them
electron-forge publish --dry-run
# This will publish the result of the dry run
electron-forge publish --from-dry-run

You need to make sure you persist and restore the built files and the the dry run JSON files

just-paja commented 6 years ago

Thank you, @MarshallOfSound. I will try this and report back.

just-paja commented 6 years ago

Thank you again, @MarshallOfSound. Your suggestion worked. Please consider renaming things. I wouldn't expect a dry run to produce anything.

RaffaeleSgarro commented 2 months ago

If the magic flag still --dry-run/--from-dry-run? It's not documented (beside here) and it's a waste of time when testing deployments.

What is the reason to have one command execute another one?