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

semantic-release-with-github-actions

v1.1.0

Published

> This is a demo of how to automatically publish npm packages to the npm registry using GitHub Actions and `semantic-release`.

Downloads

6

Readme

Using semantic-release with GitHub Actions

This is a demo of how to automatically publish npm packages to the npm registry using GitHub Actions and semantic-release.

Watch the demo at https://www.youtube.com/watch?v=rCXq86FOlzQ

screenshot

What is semantic-release?

semantic-release automates the whole package release workflow including: determining the next version number, generating the release notes and publishing the package. This removes the immediate connection between human emotions and version numbers, strictly following the Semantic Versioning specification.

See https://github.com/semantic-release/semantic-release#how-does-it-work

What is GitHub Actions?

GitHub Actions is a code execution platform for doing CI/CD. It's similar to services like Travis CI or Circle CI, but it's built right into GitHub.

Read more at https://github.com/features/actions or what a short demo at https://www.youtube.com/watch?v=TwkAD_yljVw

Steps to set up Semantic Release on your GitHub repo

  • [x] Only allow squash merging of pull requests
  • [x] Install https://github.com/apps/semantic-pull-requests
  • [x] Create npm token using npm token create or https://www.npmjs.com/settings
  • [x] Add token to repo secrets as NPM_TOKEN
  • [x] Add release workflow file to .github/workflows/release.yml
  • [x] Set version to 0.0.0-development in package.json
  • [x] npm i -D semantic-release
  • [x] Use semantic commit messages
  • [x] Create a pull request

Example Workflow

name: Release npm package

on:
  push:
    branches:
      - master

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@v1
        with:
          node-version: "12.x"
      - run: npm ci
      - run: npm run build --if-present
      - run: npm test
      - run: npx semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}