Publishing to Github packages using Projen

Publishing to Github packages using Projen

Npm releases made easy

Projen is the project generator to create and maintain project configuration through code. It takes a "batteries included" approach and aims to offer dozens of different project types out of the box. One of the core functionality of the projen is publishing packages to different repositories like npm.

Configuring projen to release to npm

We can set the following properties to configure the projen to set up release workflows for npm.

  • releaseToNpm = true
  • npmRegistryUrl = ''
  • repository = Github Repository URL


const { typescript } = require('projen');

const project = new typescript.TypeScriptProject({
  name: '@username/package-name',
  authorName: 'Author Name',
  authorEmail: '',
  defaultReleaseBranch: 'master',
  releaseToNpm: true,
  repository: '',
  npmDistTag: 'latest',
  npmRegistryUrl: '',