Skip to content

Publish widget CDN releases to Azure - #17

Merged
alec-bell merged 1 commit into
mainfrom
fix/azure-widget-cdn
May 16, 2026
Merged

alec-bell merged 1 commit into
mainfrom
fix/azure-widget-cdn

Conversation

@alec-bell

Copy link
Copy Markdown
Contributor

Summary

  • Point the default widget ringtone URL at the verified Azure static website origin.
  • Replace the release workflow's GCP bucket upload path with Azure Storage static website uploads.
  • Preserve existing release behavior for beta, versioned, latest, and shared asset paths.

Verification

  • npm ci && npm run lint && npm test && npm run build
  • git diff --check

Follow-up Required Before Release

  • Configure widget repo Actions variables: AZURE_CLIENT_ID_PRODUCTION, AZURE_TENANT_ID, AZURE_SUBSCRIPTION_ID_PRODUCTION.
  • Add Azure OIDC federated credentials for autophonix/thunderphone-widget release refs (main and beta) to the production GitHub Azure app/service principal.
  • Ensure that service principal has Blob Data Contributor access to stthunderphoneprod.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 4fa052f179

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/useThunderPhone.ts
import type { WidgetState, WidgetSessionResponse } from './types'

const DEFAULT_RINGTONE_URL = 'https://storage.googleapis.com/thunderphone-widget-cdn/widget/assets/ringtone-default.mp3'
const DEFAULT_RINGTONE_URL = 'https://stthunderphoneprod.z13.web.core.windows.net/widget/assets/ringtone-default.mp3'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Serve default ringtone from a CORS-capable origin

This change points DEFAULT_RINGTONE_URL at the Azure static website endpoint, but the hook always loads ringtone audio with audio.crossOrigin = 'anonymous' (same file), which requires a valid Access-Control-Allow-Origin response for cross-origin embeds. Azure Storage static website endpoints (*.web.core.windows.net) do not provide configurable CORS headers, so when integrators enable ringtone: true from a different site origin, the browser can block the ringtone fetch and it will not play.

Useful? React with 👍 / 👎.

@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.1.1-beta.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@alec-bell

Copy link
Copy Markdown
Contributor Author

End-to-end release proof completed.

Verification:

  • Widget PR CI build-and-lint: passed.
  • Real Release workflow from beta branch: passed.
  • Release steps passed: lint, test, build, Azure login, semantic-release, Publish to npm, Upload to CDN, Upload assets to CDN.
  • npm verified: @thunderphone/widget@1.1.1-beta.1 is published with the beta dist-tag.
  • Azure verified:
    • https://stthunderphoneprod.z13.web.core.windows.net/widget/beta/widget.js -> 200 application/javascript
    • https://stthunderphoneprod.z13.web.core.windows.net/widget/beta/style.css -> 200 text/css
    • https://stthunderphoneprod.z13.web.core.windows.net/widget/assets/ringtone-default.mp3 -> 200 audio/mpeg
    • beta widget bundle contains gcpRefs=0, azureRingtoneRefs=1

Release auth configured:

  • Widget repo Actions vars are set for Azure production.
  • Azure OIDC federated credentials are configured for autophonix/thunderphone-widget refs main and beta on id-thunderphone-api-prod.
  • id-thunderphone-api-prod has Storage Blob Data Contributor on stthunderphoneprod.

@alec-bell
alec-bell requested a review from kolchinski May 16, 2026 04:31

@kolchinski kolchinski left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@alec-bell
alec-bell merged commit daf8b00 into main May 16, 2026
2 checks passed
@alec-bell
alec-bell deleted the fix/azure-widget-cdn branch May 16, 2026 04:32
@github-actions

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.1.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants