Coder Social home page Coder Social logo

semantic-release-base's Introduction

Crystal Ball Projects documentation

Package version NPM downloads Build status Known vulnerabilities Test coverage Maintainability :status      
Renovate Commitizen friendly ZenHub Semantic Release Contributor Covenant :integrations
Contains magic Full of love :flair       


Fully automated version management and package publishing for 🔮 packages



Package contains the shared base configs for automated release management with Semantic Release. Included configurations will:

  1. Analyze commits using the ESLint commit standards to determine a semver version
  2. Generate release notes for the release
  3. Generate changelog updates for the release
  4. Update the package.json version and publish to NPM
  5. Push a release commit and tag
  6. Add a comment to Github issues and PRs resolved in the release

Setup

1. Install

npm i -D @crystal-ball/semantic-release-base

2. Update package.json

{
  "release": {
    "extends": ["@crystal-ball/semantic-release-base"]
  }
}

CI/CD configuration

Releases should be configured to trigger on change to default branch in CI/CD. Configurations must be set as environment values including:

  • GH_TOKEN Github token
  • NPM_TOKEN NPM token

Configuring Github Actions

jobs:
  ci-cd:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v1
      - name: Setup Node.js
        uses: actions/setup-node@v1
        with:
          node-version: '10'
      - name: Install
        run: npm install
        env:
          CI: true
      - name: Test
        run: npm test
      - name: Release
        if: success() && github.ref == 'refs/heads/main'
        run: npx semantic-release
        env:
          GH_TOKEN: ${{ secrets.SEMANTIC_GH_TOKEN }}
          NPM_TOKEN: ${{ secrets.SEMANTIC_NPM_TOKEN }}

Configuring Travis

deploy:
  provider: script
  skip_cleanup: true
  script:
    - npx semantic-release

Changelog generation

  • Commits with breaking changes will create a notes section

Included plugins

semantic-release-base's People

Contributors

renovate[bot] avatar dhedgecock avatar semantic-release-bot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.