Coder Social home page Coder Social logo

algolia / shipjs Goto Github PK

View Code? Open in Web Editor NEW
765.0 56.0 30.0 13.21 MB

Take control of what is going to be your next release.

Home Page: https://community.algolia.com/shipjs/

License: MIT License

JavaScript 97.48% Shell 2.52%
release process automation ci semver semantic versioning github conventional-changelog conventional-commits

shipjs's Introduction

πŸ›³ Ship.js

npm CircleCI NPM All Contributors Chat on Slack

Take control of what is going to be your next release.
https://community.algolia.com/shipjs/

Features

  • Automated
    • Minimize your effort for release and make less mistakes.
  • Asynchronous
    • You don't have to release on your local machine. Do it asynchronously and continue your work.
  • Collaborative
    • Don't sweat it alone. Review the next release on pull request with your colleagues.

Installation

Running the following command will guide you to set it up interactively.

npx shipjs setup

This interactive CLI will help you install Ship.js into your package and create a tailored config file for your project.

npx shipjs setup

Why πŸ€·πŸ»β€

Coding is fun, debugging and testing are okay, but releasing is NOT.

When releasing, you go through something like the following:

  • Update the version in package.json
  • Update the changelog
  • Actually release it (e.g. npm run build && npm publish)
  • Create a git tag
  • Create a release on GitHub

What could go wrong?

  • You might make mistakes during the release.
    • Environments are different across your team members.
    • You're releasing alone because the whole process happens on your local machine.
    • It's not your everyday-job. Mistakes can happen.
  • You are blocked and cannot do anything else until it's done.
    • Even if you have a release script, you need to watch until the script finishes well.
    • You don't want to switch to another feature branch and work there until the script finishes.

How to solve them❓

In Ship.js, the release process consists of three parts.

Part 1. Preparation (shipjs prepare)

Preview

Run shipjs prepare and it will briefly do the following:

  • Figure out next version.
  • Update the version and changelog.
  • Create a pull request.

It takes less than a couple of minutes.

Part 2. Review

  • Review the PR by yourself, or with your colleagues.
  • Add more commits to the PR if you want.
  • You can hold the release, build from the staging branch and test it manually.
  • If you want to cancel the release, just close the PR and delete the staging branch.

When you think it's ready to release, merge the PR.

Part 3. Trigger a release (shipjs trigger)

Run shipjs trigger and it will briefly do the following:

  • Run a final test (unit, e2e, etc).
  • Release it to NPM (or elsewhere as you configure it).
  • Create a git tag for the version.
  • Create a release for the tag on GitHub.

You can manually run shipjs trigger on the base branch after the PR is merged.

However you can also configure your CI service(e.g. CircleCI) to do this for you. It means the longest process is on the CI service asynchronously, not occupying your working environment.

Getting Started

Let's move on to the guide.

Or, you can watch this video if you prefer.

Getting Started with Ship.js

How is it different from semantic-release?

semantic-release is a tool for fully automated version management and package publishing.

Ship.js gives you more control over the release process. Ship.js automatically creates a PR before publishing every release, so that you can:

  • Confirm the next version is correct.
  • Confirm which commits are going to be released and discuss them with colleagues.
  • Edit the automatically generated changelog for clarity & readability.
  • Run any automated tests on the package release candidate.
  • Build a release candidate automatically (with Pika CI or CodeSandbox).

How to Contribute?

Read Contribution Guide β†’

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Eunjae Lee

πŸ’» πŸ“–

Fred K. Schott

πŸ“–

Yasuaki Uechi

πŸ’» πŸ“–

Dmitry Ivakhnenko

πŸ’» πŸ“–

James George

πŸ’» πŸ“–

kazuya kawaguchi

πŸ’» πŸ“

tyankatsu

πŸ’» πŸ“–

Haroen Viaene

πŸ’»

Shinya Ohyanagi

πŸ’»

Donghoon Song

πŸ’»

Miyata Jumpei

πŸ’»

lulzneko

πŸ’» πŸ“–

Vinayak Kulkarni

πŸ’»

This project follows the all-contributors specification. Contributions of any kind welcome!

Badge deploy

Show the world you're using Ship.js

[![deploy](https://img.shields.io/badge/deploy-πŸ›³%20Ship.js-blue?style=flat)](https://github.com/algolia/shipjs)
<a title="deploy" href="https://github.com/algolia/shipjs" rel="nofollow">
  <img src="https://img.shields.io/badge/deploy-πŸ›³%20Ship.js-blue?style=flat" />
</a>

shipjs's People

Contributors

aseure avatar cwqt avatar dhayab avatar donghoon-song avatar eunjae-lee avatar fredkschott avatar haroenv avatar heavenshell avatar incredimike avatar instantsearch-bot avatar jamesgeorge007 avatar jeetiss avatar kazupon avatar kimjipang avatar lulzneko avatar miyajan avatar renovate[bot] avatar shortcuts avatar tyankatsu0105 avatar uetchy avatar vinayakkulkarni avatar writeens avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

shipjs's Issues

the way to merge

  1. create a merge commit
  2. squash and merge

toSameBranch: (2)
toReleaseBranch: (1)

-> it should be documented & added as a description in PR

fix `git push`

Now it's pushing only tags.
It should be something like git push && git push origin v0.1.2.

exit with error at release when there's no remote branch for release

name = getBranchNameToMergeBack()

When there is no remote branch named name, it will fail.
So at the beginning of release, let's check it first, and exit with error if not exists.
User has to manually create the release branch because shipjs has no idea which is the latest released commit.

add slack notification

add slack notification for success or failure.
(When shouldRelease return false, it exits with exitCode 0. This time, let's not send a notification.)

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset name not found within published preset config (monorepo:babel6). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

publishing command for yarn

publishCommand is defaultConfig for yarn is supposed to be yarn publish --no-git-tag-version --non-interactive.

Automating part-1

It won't work. Hub isn't on circleci. Let's fix this documentation.

dry run

It should have an option for dry run

Support independent versioning in monorepo

monorepo: {
  ...
  independentVersion: true
}

Independent versioning is okay-ish, because git log can be scoped to specific directory.

However, independent changelog is hard specially in independent versioning mode.
With independent versioning "OFF", an example of independent changelog can be this, but with it "ON", it makes it harder.

How can we achieve this?

Clean up flow codes

To be:
Flow: an array of steps

Think about the "prepare" flow and the different step that should take place when using independent versioning in monorepo and when it's not.

accept an array in `pullRequestReviewer`

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

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.