githubEdit

Google Cloud Storage

Publishing your Electron app artifacts to a Google Cloud Storage bucket.

circle-info

This Publisher was added in Electron Forge v7.1.0.

The Google Cloud Storage target publishes all your artifacts to a Google Cloud Storage bucketarrow-up-right.

Installation

npm install --save-dev @electron-forge/publisher-gcs

Usage

To use @electron-forge/publisher-gcs, add it to the publishers array in your Forge configuration:

forge.config.js
module.exports = {
  // ...
  publishers: [
    {
      name: '@electron-forge/publisher-gcs',
      config: {
        storageOptions: {
          // add additional Storage constructor parameters here
          projectId: 'my-project-id'
        },
        bucket: 'my-bucket',
        folder: 'custom-folder-name',
        public: true
      }
    }
  ]
};

Additional configuration options are documented in PublisherGCSConfigarrow-up-right.

To pass options into the Google Cloud Storage SDK's Storage constructorarrow-up-right, use the config.storageOptions parameter.

Output location

When executed, the Publisher will publish to your GCS bucket under the following key:

circle-exclamation

Authentication

Under the hood, the Google Cloud Storage Publisher uses the @google-cloud/storage SDK and its associated authentication options.

We recommend following Google's authentication documentation for client librariesarrow-up-right to get authentication configured.

Last updated

Was this helpful?