115 Commits

Author SHA1 Message Date
Pierre Vanduynslager
3503407bf4 docs: clarify which commit types trigger a release 2018-05-20 23:55:47 +03:00
Pierre Vanduynslager
6693080b51 style: fix table indentation 2018-05-20 23:55:47 +03:00
robert
50f3c6e140 docs(README): correct pluralization 2018-03-07 09:39:20 -05:00
William Hosford
a7c187f31b docs: fix grammar and typos in README, CONTRIBUTING, installation guide, and plugin guide 2018-02-25 17:43:51 +00:00
Pierre Vanduynslager
c2beb643fa feat: add the prepare plugin hook
BREAKING CHANGE: Committing or creating files in the `publish` plugin hook is not supported anymore and now must be done in the `prepare` hook

Plugins with a `publish` hook that makes a commit or create a file that can be committed must use the `prepare` hook.
2018-02-19 00:28:50 -05:00
Pierre Vanduynslager
49f5e704ba feat: add success and fail notification plugins
- Allow `publish` plugins to return an `Object` with information related to the releases
- Add the `success` plugin hook, called when all `publish` are successful, receiving a list of release
- Add the `fail` plugin hook, called when an error happens at any point, receiving a list of errors
- Add detailed message for each error
2018-02-11 19:53:41 -05:00
mchao409
2f8d71644d docs: make some grammatical, spelling, typo fixes. 2018-02-09 21:26:21 -08:00
Pierre Vanduynslager
d0b304e240 feat: get last release with git tags
- Remove the `getLastRelease` plugin type
- Retrieve the last release based on Git tags
- Create the next release Git tag before calling the `publish` plugins

BREAKING CHANGE: Remove the `getLastRelease` plugin type

The `getLastRelease` plugins will not be called anymore.

BREAKING CHANGE: Git repository authentication is now mandatory

The Git authentication is now mandatory and must be set via `GH_TOKEN`, `GITHUB_TOKEN`,  `GL_TOKEN`, `GITLAB_TOKEN` or `GIT_CREDENTIALS` as described in [CI configuration](https://github.com/semantic-release/semantic-release/blob/caribou/docs/usage/ci-configuration.md#authentication).
2018-01-27 16:50:29 -05:00
mpuels
0c1f0a1ba7 docs: typo 2018-01-15 14:15:45 -08:00
Pierre Vanduynslager
fdb995f77d docs: publish with gitbook 2018-01-05 16:05:30 -05:00
Pierre Vanduynslager
ed89361d7c docs: documentation improvements
**Refactor and clarify the documentation in `README.md`**
- Add Highlights
- Add a Table of contents
- Clarify the way semantic-release works
- Clarify relationship with the CI environments
- Describe local install for Node projects (with a `package.json`) and global install for non-JavaScript projects
- Explain CI general configuration (environment variables and a run after all jobs are successful)
- Clarify configuration (via config file or CLI arguments)
- Clarify plugin roles and configuration
- Add doc for shareable configuration
- Add recipes
- Add resources (Videos, articles, tutorials)
- Add a Support section
- Add a Team section

**Add the following FAQs**
- How can I use a npm build script that requires the `package.json`’s version ?
- Can I use Semantic-release with Yarn?
- Can I use Semantic-release to publish non-JavaScript packages?
- Can I use Semantic-release with any CI service?
- Can I use Semantic-release with any GitLab?
- Can I use Semantic-release with any Git hosted environment?
- Can I skip the release to the npm registry?
- Can I use .npmrc options?
- How can I set the access level of the published npm package?
- Can I use Semantic-release to publish a package on Artifactory?
- Can I set the initial release version of my package to 0.0.1?
- Why does semantic-release require Node version >= 8?

**Clarify Nove 8 requirement and solutions**
- Add Node version requirement explanation and solutions
- [X] Display a link to the documentation when running on Node < 8 version

**Add recipes**
- Travis
- GitLab CI
- Travis with build stages - To be done in #573
- CircleCI workflows - To be done in #573
2018-01-05 16:05:30 -05:00
Pierre Vanduynslager
5bc46a08cf feat: allow to release from local machine 2018-01-02 14:31:43 -05:00
Pierre Vanduynslager
3c80fd2bf1 docs: update badges
Include npm version badges for both `@latest` and `@next` dist-tag
2017-12-31 00:39:27 -05:00
Pierre Vanduynslager
8d575654c2 feat: make semantic-release CI agnostic
- Remove `@semantic-release/condition-travis` from the default plugins
- Verify the current branch in the core
- Verify the build is not triggered by a PR in the core
- Run in dry-run mode if not triggered on CI
- Dry-run mode runs the `verifyConditions` plugins, allowing to detect configuration error locally
- Return without error when no version has to be released due to no changes
- Return without error if the build is triggered from a PR
- Return without error if the current branch is not the configured branch
- CLI return with exit code 1 if there is a `semanticReleaseError`, allowing to fail builds in case of config error, missing token etc...

BREAKING CHANGE: `semantic-release` doesn't make sure it runs only on one Travis job anymore.
The CI configuration has to be done such that `semantic-release`
- runs only once per build
- runs only after all tests are successful on every jobs of the build
- runs on Node >=8

This can easily be done with [travis-deploy-once](https://github.com/semantic-release/travis-deploy-once).

Migration Guide

Modify your `.travis.yml` to use `travis-deploy-once`.
Replace:
```yaml
after_success:
  - npm run semantic-release
```
by:
Replace
```yaml
after_success:
  - npm install -g travis-deploy-once@4
  - travis-deploy-once "npm run semantic-release"
```
2017-12-30 23:15:25 -05:00
Pierre Vanduynslager
754b420fd6 feat: support sharable configuration
Adds the options `extends`, which can be defined via configuration file or CLI arguments to a single path or an array of paths of shareable configuration.
A shareable configuration is a file or a module that can be loaded with `require`.
Options is defined by merging in the following order of priority:
- CLI/API
- Configuration file
- Shareable configuration (from right to left)

Options set in a shareable configuration can be unset by setting it to `null` or `undefined` in the main configuration file. If a default value applies to this property it will be used.
2017-12-22 14:22:30 -05:00
Pierre Vanduynslager
f707b1a90a feat: allow to define plugin options globally 2017-12-22 14:22:30 -05:00
Hutson Betts
0113db2e06 docs(README): add node support policy
Add a _Node Support Policy_ section to the project's `README.md` file
to indicate what this project, and its core team, are promising in terms
of Node runtime support.

Establishing a support policy provides reassurance to the community that
they can expect a level of functionality from `semantic-release`, while
providing guidance to the core maintainers, and everyone else that
contributes, the level of support they should espire to.

Closes #485
2017-12-01 15:39:21 -08:00
Pierre Vanduynslager
0c67ba517f feat: Make semantic-release language agnostic
- Do not rely on `package.json` anymore
- Use `cosmiconfig` to load the configation. `semantic-release` can be configured:
  - via CLI options (including plugin names but not plugin options)
  - in the `release` property of `package.json` (as before)
  - in a `.releaserc.yml` or `.releaserc.js` or `.releaserc.js` or `release.config.js` file
  - in a `.releaserc` file containing `json`, `yaml` or `javascript` module
- Add the `repositoryUrl` options (used across `semantic-release` and plugins). The value is determined from CLi option, or option configuration, or package.json or the git remote url
- Verifies that `semantic-release` runs from a git repository
- `pkg` and `env` are not passed to plugin anymore
- `semantic-release` can be run both locally and globally. If ran globally with non default plugins, the plugins can be installed both globally or locally.

BREAKING CHANGE: `pkg` and `env` are not passed to plugin anymore.
Plugins relying on a `package.json` must verify the presence of a valid `package.json` and load it.
Plugins can use `process.env` instead of `env`.
2017-11-24 21:56:15 -05:00
Pierre Vanduynslager
5bec59b26b feat: Expect plugins to return Promises
BREAKING CHANGE: Each plugin is expected to return an async function or a Promise returning function. The callback parameter is not passed to plugins anymore.
2017-11-24 21:56:15 -05:00
Pierre Vanduynslager
d548edcf37 feat: Extract npm and github publish to plugins
- Add a new plugin type: `publish`
- Add support for multi-plugin. A plugin module can now return an object with a property for each plugin type
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) in addition of Travis for the verify condition plugin
- Uses by default [npm](https://github.com/semantic-release/npm) and [github](https://github.com/semantic-release/github) for the publish plugin
- `gitTag` if one can be found is passed to `generateNotes` for both `lastRelease` and `nextRelease`
- `semantic-release` now verifies the plugin configuration (in the `release` property of `package.json`) and throws an error if it's invalid
- `semantic-release` now verifies each plugin output and will throw an error if a plugin returns an unexpected value.

BREAKING CHANGE: `githubToken`, `githubUrl` and `githubApiPathPrefix` have to be set at the [github](https://github.com/semantic-release/github) plugin level. They can be set via `GH_TOKEN`, `GH_URL` and `GH_PREFIX` environment variables.

BREAKING CHANGE: the `npm` parameter is not passed to any plugin anymore. Each plugin have to read `.npmrc` if they needs to (with https://github.com/kevva/npm-conf for example).
2017-11-21 16:41:04 -05:00
Gregor Martynus
332608378a
docs(README) fix plugin anchor links (#504) 2017-11-21 10:15:01 -08:00
Matt Ziemer
018835f56d docs(README): typo (#516) 2017-11-21 10:03:16 -08:00
Josh Duff
a4951b7c30 fix(docs): remove unnecessary backticks in readme 2017-11-10 12:31:53 -05:00
Pierre-Denis Vanduynslager
e2a8a5cd32 feat: Refactor CLI to run with one command, improve logs, modularize, add tests
- Run with one command and do not rely on error exit codes to stop the process when a release is not necessary
- Break `index.js` in smaller modules in order to improve testability and simplify the code
- Add several missing unit and integration tests to reach 100% coverage
- Integration tests now test end to end, including publishing to Github (with http://www.mock-server.com on Docker)
- Use `tj/commander.js` to print an help message, verify and parse CLI arguments
- Semantic-release can now be called via Javascript API: `require('semantic-release')(options)`
- Remove npmlog dependency and add more log messages
- Logger is now passed to plugins
- Add debug logs with `visionmedia/debug`. `debug` is enabled for both semantic-release and plugins with `--debug`
- Use `kevva/npm-conf` in place of the deprecated `npm/npmconf`
- Pass lastRelease, nextRelease and commits to generate-notes plugin
- In dry-run mode, print the release note instead of publishing it to Github as draft, and skip the CI verifications
- The dry-run mode does not require npm and Github TOKEN to be set anymore and can be run locally

BREAKING CHANGE: Semantic-Release must now be executed with `semantic-release` instead of `semantic-release pre && npm publish && semantic-release post`.
BREAKING CHANGE: The `semantic-release` command now returns with exit code 0 on expected exception (no release has to be done, running on a PR, gitHead not found, other CI job failed etc...). It only returns with 1 when there is an unexpected error (code error in a plugin, plugin not found, git command cannot be run etc..).
BREAKING CHANGE: Calling the `semantic-release` command with unexpected argument(s) now exit with 1 and print an help message.
BREAKING CHANGE: Semantic-Release does not rely on `npmlog` anymore and the log level cannot be configured. Debug logs can be activated with CLI option `--debug` or with environment variable `DEBUG=semantic-release:*`
BREAKING CHANGE: The CLI options `--debug` doesn't enable the dry-run mode anymore but activate the debugs. The dry run mode is now set with the CLI command `--dry-run` or `-d`.
2017-10-27 18:07:13 -07:00
Pierre-Denis Vanduynslager
a58d12d5e7 chore: Update badges 2017-09-30 13:30:41 -04:00
Pierre-Denis Vanduynslager
cc3c8f2548 ci: Use codecov for code coverage 2017-09-30 13:30:41 -04:00
Pierre-Denis Vanduynslager
266a3f72dc chore: Add license file 2017-09-30 13:30:41 -04:00
Richard Littauer
41d9b7e984 docs: fix grammatical error in README
Just a small fix to make this sentence parse.
2017-09-22 03:11:24 -04:00
Richard Littauer
88b5895f80 docs(README): update commit lint suggestion (#429)
validate-commit-msg is deprecated, and points to commitlint.
2017-09-14 21:22:18 -07:00
Stephan Bönnemann
f534c57215 fix: remove support for node < 8
BREAKING CHANGE: Remove support for publishing a package with node < 8. [Details](https://github.com/semantic-release/semantic-release#why-does-semantic-release-require-node-version-8).
2017-08-19 14:15:28 -07:00
Jan Peer Stöcklmair
6145bc9ba5 docs(readme): add sgc (#386) 2017-08-12 15:59:01 -07:00
Piper Chester
609b46f1cf docs(README): minor typo (#376) 2017-06-12 13:41:42 +02:00
Ryan Kimber
6a172e1720 docs(README.md): discourage use of pre-patch, pre-minor and pre-release 2016-11-28 17:20:18 +01:00
Mark Dalgleish
d7f5d19073 docs(readme): fix link to how the CLI works 2016-11-28 11:34:33 +01:00
Cory House
41125ee8aa docs(readme): fix grammar 2016-06-28 19:27:43 +02:00
Colin Eberhardt
4b22426873 docs(read): fixed typo 2016-03-16 21:12:40 +00:00
Markus Tacker
342064f198 docs(readme): fix link to explanation of commit message format
The conventions have been split off in ajoslin/conventional-changelog@48580b0391

One could also link to the pinned version, f07464cd75/convention.md
2016-02-13 20:22:23 +01:00
jrwebdev
2644badeec feat(post): Adds GitHub Enterprise support
Adds githubApiPathPrefix option for GitHub Enterprise APIs. Removes parse-github-repo-url check from
verify to support custom GitHub URLs

closes #146
2016-01-18 18:29:15 +13:00
Stephan Bönnemann
5cdc732b68 chore: remove babel, fix integration tests
This commit removes babel/es6 from all source and test files, because it was introducing a lot of overhead and only little gain.
This commit fixes and enables integration tests on Travis.
This commit fixes #153 and #151 along the way.

_Originally this commit should have only removed babel, but without working tests that's a bit too hairy._
_I only realized that half way into removing babel/es6, so things are all over the place now._

Closes #153, Closes #151
2015-12-31 15:11:54 +01:00
Matteo Ronchi
de4bd7750e docs(readme): update link to deprecated npm cli tag command 2015-10-13 12:03:30 +02:00
Stephan Bönnemann
269fb519bf docs(README): fix mistake in headline
Closes #95
2015-09-27 12:22:33 +02:00
Stephan Bönnemann
c614fe4a74 docs(README): add example commits 2015-09-18 11:41:58 +02:00
Kent C. Dodds
81de8ae19b docs(readme): add convention links
Link to commitizen and validate-commit-msg for project maintainers to simplify contributing.
2015-09-18 11:24:55 +02:00
Stephan Bönnemann
143457e03d docs(README): smaller fixes and clarifications 2015-09-16 09:25:04 +02:00
Stephan Bönnemann
2c17773c75 docs(README): add egghead.io tutorial 2015-09-08 10:07:39 +01:00
Stephan Bönnemann
0a17e8e780 chore: make repo "commitizen friendly"
Closes #74
2015-08-28 10:29:48 +02:00
Stephan Bönnemann
0e013c2dea docs(README): fix badge links 2015-08-24 14:59:24 +02:00
Stephan Bönnemann
ad9501540e docs(README): use equally sized, optimized talk thumbnails 2015-08-23 14:26:47 +02:00
Stephan Bönnemann
7af30f0ad4 docs(README): list plugins and more talks 2015-08-23 14:16:09 +02:00
Stephan Bönnemann
2405453f2d docs(README): nice badge pyramid 2015-08-22 19:53:36 +02:00