Skip to content

Latest commit

 

History

History
100 lines (76 loc) · 2.62 KB

File metadata and controls

100 lines (76 loc) · 2.62 KB

Release Instructions

This document outlines the process for releasing new versions of sceni-code.

Prerequisites

Before releasing, ensure you have:

  • Push access to the repository
  • NPM publish permissions for the @scenius/sceni-code packages
  • Docker Hub credentials configured as GitHub secrets:
    • DOCKER_USERNAME
    • DOCKER_PASSWORD
  • NPM token configured as GitHub secret:
    • NPM_TOKEN

Release Process

1. Prepare the Release

  1. Ensure all changes are merged to the main branch
  2. Run the full test suite locally:
    npm run preflight
  3. Update the version in the root package.json and workspace packages:
    npm version <version> --no-git-tag-version
    npm version <version> --no-git-tag-version --workspaces
    Where <version> is the new version (e.g., 1.0.0, 1.0.1, etc.)

2. Create a Release Tag

  1. Commit the version changes:
    git add -A
    git commit -m "chore: release v<version>"
  2. Create and push a tag:
    git tag v<version>
    git push origin main
    git push origin v<version>

3. Automated Release

Once the tag is pushed, the following will happen automatically:

  1. NPM Release (npm-release.yml):

    • Runs tests
    • Builds all packages
    • Publishes to NPM registry
    • Creates a GitHub release
  2. Docker Build (docker-build.yml):

    • Builds the Docker image
    • Tags with version, major.minor, major, and SHA
    • Pushes to Docker Hub

4. Manual Release (Alternative)

If you need to release manually:

  1. Trigger the NPM release workflow:

    • Go to Actions → NPM Release → Run workflow
    • Enter the version number (without 'v' prefix)
  2. The Docker build will automatically trigger on the main branch push

Version Numbering

Follow semantic versioning (semver):

  • MAJOR version for incompatible API changes
  • MINOR version for backwards-compatible functionality additions
  • PATCH version for backwards-compatible bug fixes

Post-Release

After a successful release:

  1. Verify the packages are available on NPM
  2. Verify the Docker image is available on Docker Hub
  3. Update any documentation or changelog as needed
  4. Announce the release to users if applicable

Troubleshooting

NPM Publish Fails

  • Ensure NPM_TOKEN secret is valid
  • Check that the package name is not already taken
  • Verify you have publish permissions

Docker Build Fails

  • Ensure DOCKER_USERNAME and DOCKER_PASSWORD secrets are set
  • Check Docker Hub rate limits
  • Verify the Dockerfile builds locally

Tests Fail

  • Run npm run preflight locally to reproduce
  • Fix any failing tests before releasing