npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@brandon-kyle-bailey/semantic-release-test

v2.1.1

Published

[![semantic-release: conventional](https://img.shields.io/badge/semantic--release-conventional-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release) [![Prerelease](https://github.com/brandon-kyle-bailey/semantic-release-test

Downloads

1

Readme

Proposal for CI/CD Automated Semantic Release workflow

semantic-release: conventional Prerelease GitHub Release

Motivation

Large teams working together on a project that requires a consistent release cycle creates friction if said release cycle is managed by humans. Humans are naturally fallible.

Using a consistent, standard commit message approach, an automated solution can be introduced that allows for semantic releases to happen without the need for human input (beyond merging the odd pull request).

Solution

Integrate one or more tools to enable automated semantic version releases as part of our CI/CD pipeline.

Proposed Tools

Getting started

To integrate this solution with an existing project, here's what you'll need:

  • Setup an npm access token added as a secret in your repository so the Github action can publish to NPM.
  • Add the following packages to your repository:
npm install --save-dev semantic-release husky @commitlint/{cli,config-conventional}

or

yarn add --dev semantic-release husky @commitlint/{cli,config-conventional}
  • Create or add a .npmrc file with the following command:

echo "access=public" >> .npmrc
  • Initialize husky and create a pre-commit hook:
npx husky init
echo "npx --no -- commitlint --edit \$1" > .husky/commit-msg
  • Setup default configuration for semantic-release:
echo "export default { extends: ["@commitlint/config-conventional"] };" > commitlint.config.ts
  • Create a Github workflow file to handle releases on merge to main:
echo "
name: Release
on:
  push:
    branches:
      - main # or master

permissions:
  contents: read # for checkout

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    permissions:
      contents: write # to be able to publish a GitHub release
      issues: write # to be able to comment on released issues
      pull-requests: write # to be able to comment on released pull requests
      id-token: write # to enable use of OIDC for npm provenance
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          fetch-depth: 0
      - name: Setup Node.js
        uses: actions/setup-node@v3
        with:
          node-version: "lts/*"
      - name: Install dependencies
        run: npm clean-install
      - name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
        run: npm audit signatures
      - name: Release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release
" > .github/workflows/release.yml

How it works

When a pull request is merged into main, the Github workflow Release action is triggered which invokes semantic-release. This traverses the commit history and compiles a release based on the commit convention.

What will trigger a release

The following commit message patterns will trigger a release of their given scope:

  • Patch release (X.X.1)
fix(pencil): stop graphite breaking when too much pressure applied
  • Minor release (X.1.0)
feat(pencil): stop graphite breaking when too much pressure applied