Coder Social home page Coder Social logo

lgtm-migrator / semantic-release-heroku Goto Github PK

View Code? Open in Web Editor NEW

This project forked from pustovitdmytro/semantic-release-heroku

0.0 0.0 0.0 1.3 MB

semantic-release plugin. Provides the ability to publish Heroku apps

License: MIT License

Shell 0.20% JavaScript 99.80%

semantic-release-heroku's Introduction

semantic-release-heroku

semantic-release plugin. Provides the ability to publish Heroku apps.

Version Bundle size Downloads

CodeFactor SonarCloud Codacy Total alerts Language grade Scrutinizer

Dependencies Security Build Status Coverage Status

Commit activity FOSSA License

πŸ‡ΊπŸ‡¦ Help Ukraine

I woke up on my 26th birthday at 5 am from the blows of russian missiles. They attacked the city of Kyiv, where I live, as well as the cities in which my family and friends live. Now my country is a war zone.

We fight for democratic values, for freedom, for our future! I am stopping any support of my packages by the time until all russians leave my country on trucks or in boxes.

πŸ’›πŸ’™ Help Ukraine! We need your support! There are dozen ways to help us, just do it!

Table of Contents

Requirements

Platform Status

To use library you need to have node and npm installed in your machine:

  • node >=10
  • npm >=6

Package is continuously tested on darwin, linux and win32 platforms. All active and maintenance LTS node releases are supported.

This package is shipped as semantic-release plugin, so you need to have semantic-release installed and configured.

Installation

To install the library, run the following command:

  npm i --save-dev semantic-release-heroku

Usage

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

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    "semantic-release-heroku"
  ]
}

This is a minimal usage sample with a default configuration.

Configuration

if needed, the configuration can be extended:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    ["semantic-release-heroku", {
      "name": "funny-app",
      "npmVersion": false,
      "tarballDir": "./dist"
    }]
  ]
}

Config attribute description:

Option Required Type Description Default
name no string Heroku application name. name from package.json
npmVersion no boolean Whether to update package.json and package-lock with new version value false, package.json won't be touched
tarballDir no string Path to directory, where you can keep generated tarball. Tarball will be generated into os /tmp directory
branches no array The branches on which releases should happen. See details on branches configuration. -

branches

semantic-release allow to manage and automate complex release workflows. You can vary plugin settings based on the target branch. Use the branches keyword for this:

  1. Skip specific branch from heroku deploy:
 "branches": ["master", "next"],
 "plugins": [
     "@semantic-release/commit-analyzer",
     "@semantic-release/release-notes-generator",
     [ 
         "semantic-release-heroku", {
             "branches": ["master"]
         } 
     ]
 ]

here semantic release will run both master and next branches, but semantic-release-heroku will skip the next branch.

  1. Use different plugin settings for contrasting branches. You can override any setting on the branch level. See example for custom app names:
[ 
   "semantic-release-heroku", {
       "branches": [
         "master", 
         { "branch": "next", "name": "staging-app" }
       ],
       "name": "production-app",
       "npmVersion": true
   } 
]

here for both master and next branches package.json version will be updated ("npmVersion": true). But Heroku apps will have different names (staging-app for next and production-app for master )

Authentication

In order to publish stuff to Heroku, you should obtain the Heroku API token. The easiest way to achieve this is to open profile page and reveal the API key.

If you already have an API key, add it as an environment variable:

  HEROKU_API_KEY='<uuid>'

Contribute

Make the changes to the code and tests. Then commit to your branch. Be sure to follow the commit message conventions. Read Contributing Guidelines for details.

semantic-release-heroku's People

Contributors

pustovitdmytro avatar renovate-bot avatar semantic-release-bot avatar renovate[bot] avatar lalaps[bot] avatar snyk-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.