Skip to content

Conversation

@rjmunro
Copy link
Contributor

@rjmunro rjmunro commented Dec 16, 2025

About the Contributor

Type of Contribution

This is a CI / Workflow improvement

Current Behavior

The "nightly" builds of packages on NPM are only built when triggered manually.

New Behavior

The "nightly" builds of packages on NPM will be built each night at 1am and published if their contents have changed.

After building each package we compute a hash of the dist folder. If that has changed since the last release, we update the version to X.Y.Z-nightly-branch-YYYYMMDD-HHMMSS-githash-disthash and publish.

Each package gets its own 8-character SHA256 dist hash

Testing

It can't really be tested except by trying it.

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

It will mean there are more releases on NPM.

This will make it much easier to develop blueprints that depend on newly added features. It's designed to work well in cooperation with SuperFlyTV/sofie-demo-blueprints#90, which will apply the output of this to the demo blueprints and ensure they still compile.

Time Frame

  • Not urgent, but really useful

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@rjmunro rjmunro changed the base branch from main to release53 December 16, 2025 15:26
@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@rjmunro rjmunro force-pushed the rjmunro/publish-nightlies-nightly branch from 38e8e11 to 7f48158 Compare December 17, 2025 11:05
…nge detection

- Add scheduled trigger at 1 AM UTC for automatic nightly builds
- Implement per-package dist hash computation in version strings
- Check each package's dist folder against published npm version
- Skip publishing if no packages have changed (exits early in prepare-publish)
- Version format: X.Y.Z-nightly-branch-YYYYMMDD-HHMMSS-githash-disthash
- Each package gets its own 8-character SHA256 dist hash
- lerna publish from-package only publishes packages with new versions
@rjmunro rjmunro force-pushed the rjmunro/publish-nightlies-nightly branch from 7f48158 to 8a1f2d9 Compare December 18, 2025 15:23
@coderabbitai
Copy link

coderabbitai bot commented Dec 18, 2025

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant