Skip to content

CI-043 - Add aMuTorrent Automatic Upstream Nightly Sync And Release Workflow

Summary

Added a scheduled and manually runnable aMuTorrent workflow that rebases the eMuleBB fork on got3nks/amutorrent only when upstream moved, builds the Windows package, publishes the rebased commit to main after a green build, and publishes one retained amutorrent-nightly-* GitHub prerelease.

The workflow intentionally stops before touching main if the upstream rebase conflicts or the package build fails.

Completed Work

  • Added .github/workflows/nightly-upstream.yml to emulebb/amutorrent.
  • The workflow runs daily at 02:41 UTC and also supports manual workflow_dispatch with force.
  • The prepare job:
  • fetches origin/main and upstream/main
  • exits without publishing when upstream is already contained in origin/main
  • rebases automation/upstream-nightly on upstream/main
  • creates an amutorrent-nightly-YYYYMMDD-SHA tag only after the rebase succeeds
  • The package job builds the x64 Windows package through python -m emule_workspace package-amutorrent.
  • The publish-main job updates origin/main only after the package build succeeds, using --force-with-lease against the originally observed origin/main commit.
  • The release job publishes or refreshes the nightly prerelease and uploads the ZIP, manifest, and SPDX SBOM.
  • The release job keeps only the latest amutorrent-nightly-* prerelease and deletes older matching releases plus tags.
  • Added tests/nightlyWorkflow.test.js to guard the workflow contract.
  • Updated fork-delta.json so fork maintenance records the automated workflow alongside the manual rebase commands.

Scope Constraints

  • This first automation pass packages x64 only.
  • main is not updated if rebase conflicts occur.
  • main is not updated if package generation fails.
  • GitHub release pruning only matches amutorrent-nightly-* prerelease tags.
  • Official releases and non-nightly tags are outside the cleanup scope.

Validation

  • git diff --check in repos/amutorrent.
  • Python YAML parse check for .github/workflows/nightly-upstream.yml.
  • JSON parse check for fork-delta.json.
  • npm run test:emulebb in repos/amutorrent.
  • git diff --check in repos/emulebb-tooling.
  • python scripts\docs-item-taxonomy-check.py.
  • python scripts\docs-structure-check.py --fail-on-wide-tables.
  • python scripts\github-roadmap-check.py.