Skip to content

Latest commit

 

History

History
114 lines (66 loc) · 2.88 KB

DEVELOPERS.md

File metadata and controls

114 lines (66 loc) · 2.88 KB

Developer's Guide

Table of contents

[[TOC]]

How to make a release

Deciding the release version number

This project adheres to Semantic Versioning. Before making the release, it must be decided if it is a major, minor or patch release.

If you are making a change that will require an upcoming major or minor version increment, update the planned version for the next release in parentheses after the Unreleased heading in CHANGELOG.md. Remember to also update the diff link for this heading at the bottom of CHANGELOG.md.

Instructions

Creating the release

Create and merge a pull request for the new version
  1. Create a local branch and name it e.g. release-of-version-<version>

    Example: release-of-version-4.1.1

  2. Edit package.json and update the version field.

  3. Run npm install

  4. Commit the changes with the commit message "update version to <version>".

  5. Edit CHANGELOG.md

    Add the new release just below the [Unreleased] heading.

    At the bottom of the file, add an entry for the new version. These entries are not visible in the rendered page, but are essential for the version links to the GitLab commit comparisons to work.

    Example:

    +## [4.1.1]
    +
    
    -[Unreleased]: https://github.com/magjac/d3-graphviz/compare/v4.1.0...HEAD
    +[Unreleased]: https://github.com/magjac/d3-graphviz/compare/v4.1.1...HEAD
    +[4.1.1]: https://github.com/magjac/d3-graphviz/compare/v4.1.0...v4.1.1
     [4.1.0]: https://github.com/magjac/d3-graphviz/compare/v4.0.0...v4.1.0
     [4.0.0]: https://github.com/magjac/d3-graphviz/compare/v3.2.0...v4.0.0
     [3.2.0]: https://github.com/magjac/d3-graphviz/compare/v3.1.0...v3.2.0
    
  6. Commit the changes with the commit message "add version <version> to CHANGELOG.md".

  7. Push:

    Example: git push origin release-of-version-4.1.1

  8. Wait until the GitHub action has run for your branch and check that it's green

  9. Create a pull request

  10. Merge the pull request

Tag and make a new release at GitHub
  1. Fetch the new master

  2. Create a new tag.

    Example: git tag v4.1.1

  3. Push the new tag.

    Example: git push origin refs/tags/v4.1.1

  4. Visit https://github.com/magjac/d3-graphviz/releases/new

  5. Use the Chose a tag dropdown to select the new tag.

  6. Set the Release title to v<version>

    Example: v4.1.1

  7. In the Describe this release area, type e.g.:

See the [CHANGELOG]([Title](https://github.com/magjac/d3-graphviz/blob/master/CHANGELOG.md#411--2022-04-09)) for details.

Be careful the get the mangled version correct. In this example 411 stands for 4.1.1.

  1. Click Publish the release.
Publish to npm with
  1. Clone the repo into clean directory

  2. Run npm install

  3. Run npm run build

  4. Run npm publish