Skip to content

Conversation

@tom-ridsdale
Copy link
Contributor

@tom-ridsdale tom-ridsdale commented Dec 12, 2025

Summary

  • Decouple AWS deployment from semantic-release by creating a separate workflow triggered by GitHub release events
  • Simplify the release flow which is currently confusing and difficult to debug

Why

The current release flow is convoluted and hard to follow, focusing on embed since embed-react is NOT deployed to AWS:

  release.yml
    └─ yarn add -W @typeform/jarvis
    └─ git checkout HEAD -- package.json  # revert so jarvis isn't committed
    └─ yarn release
         └─ scripts/release.sh
              └─ yarn release-vanilla (embed)
                   └─ semantic-release
                        └─ @semantic-release/npm prepare  # ⚠️ suspect this removes jarvis from node_modules but not totally sure, it's difficult to debug!
                        └─ @semantic-release/npm publish
                        └─ @semantic-release/exec successCmd
                             └─ yarn post-release
                                  └─ yarn release:github  # npm publish to GitHub Packages
                                  └─ yarn release:aws
                                       └─ yarn release:aws:prepare
                                            └─ sh ./scripts/prepare-release.sh  # copies build files
                                       └─ yarn release:aws:deploy
                                            └─ jarvis deploy  # ❌ FAILS - jarvis not available!

New approach:

  release.yml (on push to main)
    └─ yarn release
         └─ scripts/release.sh
              └─ yarn release-vanilla (embed)
                   └─ semantic-release
                        └─ @semantic-release/npm prepare
                        └─ @semantic-release/npm publish
                        └─ @semantic-release/exec successCmd
                             └─ yarn post-release
                                  └─ yarn release:github  # npm publish to GitHub Packages
                        └─ @semantic-release/github  # creates GitHub release ─────┐
                                                                                   │
  deploy-aws.yml (triggered by GitHub release event) <─────────────────────────────┘
    └─ yarn add -W @typeform/jarvis # install jarvis
    └─ git checkout HEAD -- package.json  # revert so jarvis isn't committed
    └─ yarn release:aws
         └─ yarn release:aws:prepare
              └─ sh ./scripts/prepare-release.sh  # copies build files
         └─ yarn release:aws:deploy
              └─ jarvis deploy  # ✅ hopefully works - jarvis is installed!

This still only deploys to AWS when there are actual changes - since the AWS workflow only triggers when a GitHub release is created, and releases only happen when semantic-release detects releasable commits.

I am expecting that it will trigger when embed OR embed-react GitHub releases are published, but the IF condition on the workflow should mean it runs for the former and is skipped for the latter.

@typeform-ops-gha
Copy link

[BOT] Preview available with hash 291822d6de8380441aeb05db01150e33ca183821 here.

@sonarqubecloud
Copy link

@tom-ridsdale tom-ridsdale marked this pull request as ready for review December 12, 2025 18:23
@tom-ridsdale tom-ridsdale requested a review from a team as a code owner December 12, 2025 18:23
@gitstream-cm
Copy link

gitstream-cm bot commented Dec 12, 2025

🥷 Code experts: tf-security

tf-security has most 👩‍💻 activity in the files.
tf-security has most 🧠 knowledge in the files.

See details

.github/workflows/release.yml

Activity based on git-commit:

tf-security
DEC
NOV
OCT
SEP
AUG
JUL 81 additions & 0 deletions

Knowledge based on git-blame:
tf-security: 81%

packages/embed/package.json

Activity based on git-commit:

tf-security
DEC
NOV
OCT
SEP
AUG
JUL 77 additions & 0 deletions

Knowledge based on git-blame:
tf-security: 93%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@tom-ridsdale tom-ridsdale merged commit 0dc8fb4 into main Dec 15, 2025
22 checks passed
@tom-ridsdale tom-ridsdale deleted the feat/TU-34343 branch December 15, 2025 09:48
typeform-ops-gha pushed a commit that referenced this pull request Dec 15, 2025
# [@typeform/embed-v5.9.0](https://github.com/Typeform/embed/compare/@typeform/embed-v5.8.0...@typeform/embed-v5.9.0) (2025-12-15)

### Features

* **TU-34343:** Create a new AWS deploy workflow ([#726](#726)) ([0dc8fb4](0dc8fb4))
@typeform-ops-gha
Copy link

🎉 This PR is included in version @typeform/embed-v5.9.0 🎉

The release is available on:

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.

4 participants