AtomLinter / linter-codeclimate

An Atom Linter plugin for the Code Climate CLI
http://github.com/codeclimate/codeclimate
MIT License
10 stars 5 forks source link

Initial Adoption of Continous Deployment using semantic-release #86

Closed keplersj closed 6 years ago

keplersj commented 6 years ago

To ease the modification/contribution to publish pipeline there has been some discussion of adopting a continuous deployment system for AtomLinter packages. To accomplish this we are making use of semantic-release and @semantic-release/apm-config.

This pull request has been dynamically created using a script. While the result is not perfect, it does accompish most of the grunt work of adopting continous deployment. There is some reconciliation that needs to be done before this can be merged.

Among the things needed to be reconciled, an APM Token and GitHub Token will need to be added to this repo's continous integration (most likely Travis CI) configuration for automated deployments to work.

Again, this Pull Request has been created by a script made by @keplersj. Please mention him if something has gone wrong, and he'll be happy to help.

ref: AtomLinter/Meta#18

cc: @Arcanemagus

Arcanemagus commented 6 years ago

@AtomLinter/linter-codeclimate @cgalvarez Any issues with adopting this functionality? As it stands this would mean requiring the Conventional Commits standard for the commit messages so the tool will know what type of release (if any) should be made.

cgalvarez commented 6 years ago

I've already used semantic-release for some projects of mine (atom-coverage is a public one). I agree it really helps with automatic releasing/deployment/publishing.

That said, I've had some issues with it in the past, which leads me to provide some insights about this PR:

Arcanemagus commented 6 years ago

npx is a NPM package that is not listed in the project dependencies

This PR is just a starting block, there are many additional changes that are required before it can be merged. This is an example of a simpler complete version of this PR: https://github.com/AtomLinter/linter-phpmd/pull/118, while alternatively it can get as messy as https://github.com/AtomLinter/atom-linter-perlcritic/pull/51 + https://github.com/AtomLinter/atom-linter-perlcritic/pull/52 + https://github.com/AtomLinter/atom-linter-perlcritic/commit/7d1b63063fe85c6077f5487ec788abcd4d561388 to get fully working 😆.

We should add the semantic-release badge to the README.md too, so anybody that reaches the project knows immediately that s/he must stick with it. @commitlint/config-conventional enforces conventional-commits. Since semantic-release can be configured to support a variety of conventions, I think we should remark it too with another badge.

Great ideas! Note that part of this is that commits can't be merged without fitting into the commit standard, and assuming the dev runs npm install a precommit hook is installed that checks the message before it even gets into the local repo.

I still have troubles with auto-updating the changelog on deployment in my projects.

Interesting, I've yet to see an issue with this on the ones done so far.


I'm happy to take care of getting this merged and working, just wanted confirmation from the people working on it that the Conventional Commits standard wouldn't be an issue 😉.

Arcanemagus commented 6 years ago

Cool, deploy step worked with no further changes needed 😀.