Détail du package

scratch-semantic-release-config

scratchfoundation6.6kBSD-3-Clause3.0.0

semantic-release shareable configuration for Scratch

Scratch, semantic-release, semantic-release-config, npm

readme

scratch-semantic-release-config

npm version

Remixed from: @jedmao/semantic-release-npm-github-config

Plugins

This shareable configuration uses the following plugins:

Summary

  • Provides an informative git commit message for the release commit that does not trigger continuous integration and conforms to the conventional commits specification (e.g., "chore(release): 1.2.3 [skip ci]\n\nnotes").
  • Creates a tarball that gets uploaded with each GitHub release.
  • Publishes the same tarball to npm.
  • Commits the version change in package.json.
  • Creates or updates a changelog file.

Install

npm install --save-dev semantic-release scratch-semantic-release-config

Usage

The shareable config can be configured in the semantic-release configuration file:

{
  "extends": "scratch-semantic-release-config",
  "branch": "main"
}

Configuration

Ensure that your CI configuration has the following secret environment variables set:

See each plugin documentation for required installation and configuration steps.

GitHub workflows

If you're configuring a GitHub workflow you might want to do a test build matrix first and then publish only if those tests succeed across all environments. The following will do just that, immediately after something is merged into main.

name: Node CI

on:
  push:
    branches:
      - main

jobs:
  test:
    name: Test on node ${{ matrix.node }} and ${{ matrix.os }}

    runs-on: ${{ matrix.os }}

    strategy:
      matrix:
        node: [8, 10, 12]
        os:
          - ubuntu-latest
          - windows-latest
          - macOS-latest

    steps:
      - name: Preserve line endings
        run: git config --global core.autocrlf false
      - name: Checkout
        uses: actions/checkout@v1
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: ${{ matrix.node }}
      - name: Install & test/cover
        run: npm ci && npm run cover
        env:
          CI: true

  release:
    name: npm publish / GitHub release
    needs: test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Setup Node
        uses: actions/setup-node@v1
        with:
          node-version: 12
          registry-url: https://registry.npmjs.org/
      - name: Install
        env:
          CI: true
        run: npm ci
      - name: Build
        if: success()
        run: npm run build
      - name: Semantic Release
        if: success()
        env:
          GH_TOKEN: ${{ secrets.GH_TOKEN }}
          NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
          NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
        run: npx semantic-release

changelog

Changelog

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

3.0.0 (2024-11-25)

  • chore!: set license to BSD-3-Clause (9e84194)

BREAKING CHANGES

  • The license for this project has changed to BSD-3-Clause

2.0.0 (2024-11-25)

  • chore!: set license to AGPL-3.0-only (b1ccfa9)

BREAKING CHANGES

  • This project is now licensed under the AGPL version 3.0

See https://www.scratchfoundation.org/open-source-license

1.0.16 (2024-09-11)

Bug Fixes

  • try to store npm tarball in /tmp dir named with git hash (76d5a20)

1.0.15 (2024-09-10)

Bug Fixes

  • work around semantic-release/npm plugin prepack issue (a5d298d)

1.0.14 (2024-02-23)

Bug Fixes

  • add Scratch to npm keywords (f39e937)

1.0.13 (2024-02-22)

Bug Fixes

  • deps: update dependency eslint-config-scratch to v9.0.6 (4040a3b)

1.0.12 (2024-02-22)

Bug Fixes

  • deps: update dependency eslint-config-scratch to v9.0.5 (a5612d6)

1.0.11 (2024-02-21)

Bug Fixes

  • deps: update dependency eslint-config-scratch to v9.0.4 (4eb6ffd)

1.0.10 (2024-02-21)

Reverts

  • Revert "chore(deps): use js-lib-bundled Renovate config" (76c051a)

1.0.9 (2024-02-21)

Bug Fixes

  • bump version to sync with npm registry (96c98fe)

1.0.8 (2023-07-01)

Bug Fixes

  • deps: update dependency @semantic-release/github to v8.1.0 (5844f05)

1.0.7 (2023-03-27)

Bug Fixes

  • deps: update dependency @semantic-release/changelog to v6.0.3 (6341b1d)

1.0.6 (2023-03-22)

Bug Fixes

  • deps: update semantic-release monorepo (e12550b)

1.0.5 (2022-10-03)

Bug Fixes

  • release: limit release git commit message to 32k (7d40354)

1.0.4 (2022-08-31)

Bug Fixes

  • release: run npm plugin before git so new package.json version gets committed (a994008)

1.0.3 (2022-08-26)

Bug Fixes

  • commitlint: tell commitlint to ignore release commits (e254188)

1.0.2 (2022-05-21)

Bug Fixes

  • ci: fix release config by moving branches setting (d001e99)