question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add semantic-release to improve the workflow

See original GitHub issue

Recently I’ve used semantic-release on three packages I own. It’s a pretty cool tool that enforces good versioning practices, as well as conventionally-formatted commit messages, etc.

Main features:

  • Automatic publish on npm after the Travis build succeeds ;
  • Version management of the package: no need to calculate what will be the next version by hand, semantic-release parses the commit messages (documentation) and sets the new version ;
  • Generates a changelog and creates a GitHub release with it. Also tags a version on git. See an example of the generated output here.

Example of commit messages, given that the current version is 1.0.0 and the push is done before any other commit:

fix(some_module): no longer display things that souldn't be displayed

bumps the version to 1.0.1

feat(some_module): implement things

bumps the version to 1.1.0

feat(some_module): move to a fluent API

BREAKING CHANGE: the ancient API no longer exists.

bumps the version to 2.0.0

Now you can create a new branch for a new feature (ie. a PR) and do that:

fix(some_module): fix things up
feat(another_module): add myMetyhod()
feat(another_module): added a new alert type

When the branch gets merged into master, semantic-release will bump from 1.0.0 to 1.1.0. Which is exactly how things should be. It’s exactly what we’re doing now, but standardized and automated.

We could also use commitizen with it to enforce good commit messages (we’ll need to warn our contributors to respect those guidelines).

I’m volunteer to sumbit a PR that adds semantic-release to our workflow (just a few lines of configuration, no CLI tool to run evertime, it’s fully automated and runs on Travis). Your thoughts?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:3
  • Comments:20 (20 by maintainers)

github_iconTop GitHub Comments

3reactions
limontecommented, Jan 29, 2018

@limonte Sorry can you tell me what this problem…

Line 27 in 742fc95

“uglify-js”: “latest”

has to do with commitizen and semantic-release?

It has nothing to do with commitizen and semantic-release. Apparently, I was young and foolish year ago when I was depending on "latest" versions of devDeps.

Opened an issue for myself: https://github.com/sweetalert2/sweetalert2/issues/859

2reactions
limontecommented, Sep 6, 2018

semantic-release is taking care of SweetAlert2 releasing process now 🎉

KILL ALL HUMANS 🤖

Read more comments on GitHub >

github_iconTop Results From Across the Web

Workflow configuration - Semantic Release - GitBook
semantic -release allow to manage and automate complex release workflow, based on multiple Git branches and distribution channels. This allow to:.
Read more >
Basic Guide to Semantic Release - Level Up Coding
To start having semantic release on a java project hosted on GitHub, the first step is to enable GitHub Actions. Click on the...
Read more >
Automate Your Release Workflow With semantic-release
semantic -release is an npm package that automates common tasks in a release workflow. This includes: ... It achieves this by analysing your...
Read more >
Create one-off releases with semantic-release | Ben Ilegbodu
How to configure semantic-release to release one-off test branches in an app in order to test dev code prior to merging a Pull...
Read more >
Learning to Use Semantic-Release the Hard Way
semantic -release is an NPM tool to automate the workflow to release an NPM package. It follows the semantic versioning specification strictly, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found