@ivangabriele/semantic-release-config-no-npm

4.1.5 • Public • Published

My Semantic Release Configuration

MIT License GitHub Check Workflow Status NPM Version

A basic configuration for Semantic Release when using a single package repository (no monorepo) and NPM or Yarn as package manager without NPM publishing.

Usage

Run:

npm i -DE @ivangabriele/semantic-release-config-no-npm semantic-release

or:

yarn add -DE @ivangabriele/semantic-release-config-no-npm semantic-release

Extend it in your package.json:

{
  // ...
  "release": {
    "extends": "@ivangabriele/semantic-release-config-no-npm"
  }
}

Then add a manually triggered workflow in Github Actions (i.e.: .github\workflows\release.yml):

name: Release

on: workflow_dispatch

jobs:
  release:
    name: Release
    runs-on: ubuntu-latest
    permissions:
      contents: write
      id-token: write
      issues: write
      pull-requests: write
    steps:
      - name: Checkout
        uses: actions/checkout@v4
        with:
          fetch-depth: 0
          persist-credentials: false
      - name: Setup
        uses: actions/setup-node@v4
        with:
          cache: yarn
          node-version: 20
      - name: Install
        run: yarn --immutable
      - name: Build
        run: yarn build
      - name: Release
        run: yarn semantic-release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
      - name: Get new version
        run: echo "NEW_VERSION=$(npm pkg get version | sed 's/"//g')" >> "$GITHUB_ENV"
      - name: Create pull request
        uses: peter-evans/create-pull-request@v6
        with:
          branch: ci-release-v${{ env.NEW_VERSION }}
          commit-message: 'ci(release): v${{ env.NEW_VERSION }}'
          title: 'ci(release): v${{ env.NEW_VERSION }}'
          token: ${{ secrets.GITHUB_TOKEN }}

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
4.1.5
2latest

Version History

VersionDownloads (Last 7 Days)Published
4.1.5
2
4.1.4
0
4.1.3
0
4.1.20
4.1.10
4.1.00
4.0.10
4.0.00
3.0.30
3.0.20
3.0.10
3.0.00
2.1.01
2.0.20
2.0.10
2.0.00
1.5.00

Package Sidebar

Install

npm i @ivangabriele/semantic-release-config-no-npm

Weekly Downloads

3

Version

4.1.5

License

MIT

Unpacked Size

13.3 kB

Total Files

5

Last publish

Collaborators

  • ivangabriele