New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

release-to-github-with-changelog

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

release-to-github-with-changelog

Parses CHANGELOG.md to publish a new release resource to the Github api

  • 1.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
52
decreased by-16.13%
Maintainers
1
Weekly downloads
 
Created
Source

release-to-github-with-changelog

CircleCI

npm version

Node v6.9.1 is required

Goal

Keep the released npm package in sync with the GitHub repo master branch:

  • the last CHANGELOG.md item is in sync with the last release on Github, with corresponding version tag
  • the package.json version is in sync with the master branch version tag

alt tag

Usage

The sources of truth are CHANGELOG.md and package.json. Your interface is your CHANGELOG.md.

CHANGELOG.md

Every CHANGELOG.md item should represent a release note of the version it describes:

# v0.2.0 //version tag
## The release title
// The release description in markdown

# v0.1.9
...
Full example:
# v0.2.0
## We can fly
Great news! The machine can now also fly!

# v0.1.0
## We can move
### What the machine does
It can move, a bit slowly but still it moves.

//...

Export a GITHUB_TOKEN env variable

Either locally with export GITHUB_TOKEN=$yourToken or in your CI tool settings (see CircleCI example).

Example of package.json

Don't forget the repository.url. It will be parsed to extract the repository full name (myOrg/myRepo in this example).

Test tool

You can include a check of your CHANGELOG.md format in your test command by using the provided release-to-github-with-changelog-pre-release-checks command.

{
  "version": "0.2.0",
  "respository": {
    "type": "git",
    "url": "git+https://github.com/myOrg/myRepo.git"
  },
  "files": ["dist"],
  "scripts": {
    "build": // build dist files
    "release": "npm publish && npm run release-to-github-with-changelog",
    "release": "npm publish && npm run release-to-github-with-changelog --branch=releases", // optional branch name
    "test": "release-to-github-with-changelog-pre-release-checks && karma start"
  }
}

CI example

circle.yml

machine:
  node:
    version: 4.1.0
dependencies:
  pre:
    - echo -e "$NPM_USER\n$NPM_PASS\n$NPM_EMAIL" | npm login
deployment:
  production:
    branch: master
    commands:
      - npm run release

Keywords

FAQs

Package last updated on 29 Apr 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc