Skip to content

Azure Blob Storage publisher #4418

Open

Description

@milanm

Pre-flight checklist

  • I have read the contribution documentation for this project.
  • I agree to follow the code of conduct that this project uses.
  • I have searched the issue tracker for a feature request that matches the one I want to file, without success.

Problem description

Forge has static-file publishers for S3 and GCS, but none for Azure Blob Storage. A team that hosts everything else on Azure and wants the update-electron-app static storage flow (Squirrel.Windows RELEASES, macOS RELEASES.json) needs an AWS or GCP bucket just for the update feed, or has to write its own publisher. Azure Blob Storage has no S3-compatible API, so publisher-s3 with a custom endpoint is not an option.

Proposed solution

An @electron-forge/publisher-azure package built on publisher-static, with the same key layout as publisher-s3 (<folder>/<platform>/<arch>/<file>, keyResolver), using @azure/storage-blob:

  • auth with a connection string, or an account URL with a SAS token or any TokenCredential (for example DefaultAzureCredential, so CI can use a managed identity or OIDC instead of a stored key)
  • releaseFileCacheControlMaxAge, same as publisher-s3
  • RELEASES / RELEASES.json uploaded after all other artifacts, so the feed never lists a package that is not there yet

We wrote this for our own app on Forge 7.11 and shipped our last two Windows and macOS releases with it. It is about 85 lines plus tests, including one that runs the real Azure SDK against a local HTTP server. If you want it in the monorepo, I can port it to Forge 8 with docs and help maintain it.

Alternatives considered

  • publisher-s3 with a custom endpoint: Azure Blob Storage does not speak the S3 API.
  • Uploading with the Azure CLI after make: works, but loses publish / --from-dry-run and the shared key layout.
  • A third-party package: this is what we will do if a first-party publisher is out of scope. I'm asking first because the S3 and GCS publishers live here, and feat: Publisher minio implementation #1502 shows that a new publisher is a maintenance question for you.

Additional information

If you'd rather not take it on, a line in the publisher docs pointing Azure users to a community package would also help.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions