Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aspublish

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aspublish

Minimalist publishing tool for GitHub and npm.

  • 0.1.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

aspublish

Publish status npm version

Minimalist publishing tool for GitHub and npm. Generates a changelog, makes a GitHub release of it, and publishes the package to npm.

Usage

Set GITHUB_TOKEN and NPM_TOKEN as environment variables.

To create a release on GitHub and publish the package to npm:

npx aspublish

May also obtain just the next version that will be created, if necessary:

npx aspublish --version

The returned version is empty if no release has been triggered.

Note that npm postversion etc. scripts will also run normally, and that the version number in package.json is irrelevant (may just be 0.0.0).

Commit format

Prefix either the commit subject or body:

PrefixRelease typePre 1.0.0Post 1.0.0
breaking:Major0.1.0 -> 0.2.01.0.0 -> 2.0.0
feat:Minor0.1.0 -> 0.1.11.0.0 -> 1.1.0
fix:Patch0.1.0 -> 0.1.11.0.0 -> 1.0.1

Except a few aliases and abbreviations, other prefixes will not trigger a new version / release.

Example

As a step during GitHub Actions:

- name: Make release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    NPM_TOKEN:  ${{ secrets.NPM_TOKEN }}
  run: |
    VERSION=$(npx aspublish --version)
    if [ -z "$VERSION" ]; then
      echo "Changes do not trigger a release"
    else
      echo "Publishing new version: $VERSION"
      npx aspublish
    fi

Or, if obtaining the version upfront is not necessary:

- name: Make release
  env:
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    NPM_TOKEN:  ${{ secrets.NPM_TOKEN }}
  run: npx aspublish

See this repository's publish.yml for a complete configuration (replace node bin/aspublish.js with npx aspublish).

FAQs

Package last updated on 23 Oct 2021

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