Skip to content

fix: pass release tag as VERSION to deploy builds#107

Merged
neonwatty merged 1 commit intomainfrom
fix/deploy-version
Apr 9, 2026
Merged

fix: pass release tag as VERSION to deploy builds#107
neonwatty merged 1 commit intomainfrom
fix/deploy-version

Conversation

@neonwatty
Copy link
Copy Markdown
Collaborator

Summary

  • Deploy jobs were building widget.js with stale package.json version (1.14.0) because semantic-release doesn't bump package.json (no @semantic-release/npm plugin — branch protection blocks direct pushes).
  • Every deploy since the widget was created has served v1.14.0 in the modal footer, regardless of the actual release version.
  • Fix: fetch-depth: 0 + VERSION=$(git describe --tags --abbrev=0) passes the latest git tag to the build script, which already checks process.env.VERSION before package.json.
  • Applied to both deploy-preview and deploy jobs.

Test plan

  • CI passes (only .github/workflows/ci.yml changed)
  • After merge, verify https://bugdrop.neonwatty.workers.dev/widget.v1.js contains the new version number
  • Open BugDrop widget on deckchecker — modal footer should show current version, not v1.14.0

The deploy jobs were building widget.js with the stale package.json
version (1.14.0) because semantic-release doesn't bump package.json
(no @semantic-release/npm plugin — branch protection blocks pushes).

Fix: fetch full git history (fetch-depth: 0) and pass the latest tag
via VERSION=$(git describe --tags --abbrev=0) to the build script,
which already checks process.env.VERSION before package.json.
@neonwatty neonwatty enabled auto-merge April 9, 2026 17:48
@neonwatty neonwatty added this pull request to the merge queue Apr 9, 2026
Merged via the queue into main with commit 8b9330e Apr 9, 2026
8 checks passed
@neonwatty neonwatty deleted the fix/deploy-version branch April 9, 2026 17:55
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

🎉 This PR is included in version 1.27.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

neonwatty added a commit that referenced this pull request Apr 15, 2026
Closes #109

Every merged PR previously ran the full test suite three times — PR, merge_group,
and a post-merge push: main rerun of the exact same SHA the queue had just
validated. The push rerun wasted ~25 runner-minutes per merge and proved
nothing the merge queue hadn't already proven.

Move the release (semantic-release) and deploy (Cloudflare Workers) jobs into
a new deploy.yml triggered on push: branches: [main]. Drop push: [main, develop]
from ci.yml entirely — develop doesn't exist in this repo, and ci.yml now runs
only on pull_request and merge_group.

The release → deploy chain stays in a single workflow via needs: [release], so
the tag semantic-release creates is visible to git describe --tags in the
deploy job's VERSION build arg (preserving the fix from #107).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant