Skip to content

Creating a Release of the SAF CLI

Amndeep Singh Mann edited this page Jun 19, 2024 · 44 revisions

NOTE: If there aren't any Dependency Updates when viewing the draft release, check the Actions and ensure that all dependabot actions have executed successfully.

We are currently automating the release process. Steps 1 through 5 are now automated by invoking the release-prep.sh script located at the root of the repository

  1. Make sure you're on the most recent commit on the SAF CLI by running git pull.
  2. Bump the SAF CLI version number in the VERSION file and package.json
    • It is a good idea to manually check and update the version of any @mitre dependencies in the package.json file.
  3. Run npm install
  4. Validate the build and unit tests
    • Run npm pack
      • Does a fresh build, checks for type issues, etc.
    • Run npm run test
  5. Add these changes, commit this change, associate a version tag with the commit (for example, "1.0.0"), and push them up
    • git add the relevant files (Do not add the .tgz file that may have been created by the npm run prepack step)
    • git commit --signoff -m "[version]"
    • git tag -a -m "brief description of change" [version]
    • git push --atomic origin main [version]
  6. Github actions will fire to produce executable versions of the SAF CLI for several OSes. Wait for the workflows for the Windows/Linux builds and for the macOS builds to finish. Download, and unzip the artifacts:
  • Mac OS (zip file containing the following)
    • saf-v[version]-x64.pkg
    • saf-v[version]-arm64.pkg
  • Windows (individual downloads - not zipped)
    • saf-v[version]-x64.exe
    • saf-v[version]-x86.exe
  • Apt-based distros like Debian (zip file containing the following)
    • saf-v[version]-amd64.deb
    • saf-v[version]-arm64.deb
    • saf-v[version]-armel.deb
  • Dnf-based distros like RHEL (single file)
    • saf-v[version]-noarch.rpm
  1. Associate the tags with the drafted release (replace"## New Features", with "## What's New" in the description)
  2. Attach the aforementioned, renamed artifacts to the draft release
  3. Make sure that the Set as the latest release checkbox is selected
  4. Publish release
  5. Wait for push-to-npm on release to complete
  6. Update the SAF Github Action Dependency
  7. Validate that the Homebrew Formula at https://github.com/mitre/homebrew-saf was automatically updated