S3
How to publish your distributable Electron app artifacts to Amazon S3
Last updated
Was this helpful?
Was this helpful?
{
name: '@electron-forge/publisher-s3',
config: {
// ...
keyResolver: (filename, platform, arch) => {
return `some-prefix/${platform}/${arch}/${filename}`
}
// ...
}
}module.exports = {
// ...
makers: [
{
name: '@electron-forge/maker-zip',
config: (arch) => ({
// Note that we must provide this S3 URL here
// in order to support smooth version transitions
// especially when using a CDN to front your updates
macUpdateManifestBaseUrl: `https://my-bucket.s3.amazonaws.com/my-app-updates/darwin/${arch}`
})
},
{
name: '@electron-forge/maker-squirrel',
config: (arch) => ({
// Note that we must provide this S3 URL here
// in order to generate delta updates
remoteReleases: `https://my-bucket.s3.amazonaws.com/my-app-updates/win32/${arch}`
})
}
],
publishers: [
{
name: '@electron-forge/publisher-s3',
config: {
bucket: 'my-bucket',
public: true
}
}
]
};const { updateElectronApp, UpdateSourceType } = require('update-electron-app');
updateElectronApp({
updateSource: {
type: UpdateSourceType.StaticStorage,
baseUrl: `https://my-bucket.s3.amazonaws.com/my-app-updates/${process.platform}/${process.arch}`
}
});