8000 Publish NPM URL on GitHub releases · Issue #1617 · semantic-release/semantic-release · GitHub
[go: up one dir, main page]

Skip to content
Publish NPM URL on GitHub releases #1617
@felipecrs

Description

@felipecrs

New feature motivation

When you enter in the GitHub releases for a version, you'd like to jump to the correspondent version released in the NPM registry.

New feature description

Plugins (such as npm) can contribute to an array of release URLs, and then, another plugin, such as github, can pickup it and put it on its release notes.

New feature implementation

To have a new global variable:

type ReleasedVersion = {
  registryName: string,
  url: string
}
let releasedVersions: ReleasedVersion[]

And, npm can:

releasedVersions.push({ registryName: 'npm', url: 'https://www.npmjs.com/package/megatar/v/1.0.2' })

Even github itself can contribute to this array:

releasedVersions.push({ registryName: 'github', url: 'https://github.com/felipecassiors/megatar/releases/tag/v1.0.2' })

And then, github, or any other which might be useful can pick-up it:

releasedVersions.forEach((v) => {
  if (v.registryName !== 'github') releaseNotes += `This release is also available on [${v.registryName}](${v.url}).`
} 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0