docs: remove mentions of travis-deploy-once
This commit is contained in:
parent
89ad3a0b61
commit
0f642ffe4d
@ -3,7 +3,6 @@
|
|||||||
## CI configurations
|
## CI configurations
|
||||||
- [CircleCI 2.0 workflows](circleci-workflows.md)
|
- [CircleCI 2.0 workflows](circleci-workflows.md)
|
||||||
- [Travis CI](travis.md)
|
- [Travis CI](travis.md)
|
||||||
- [Travis CI with build stages](travis-build-stages.md)
|
|
||||||
- [GitLab CI](gitlab-ci.md)
|
- [GitLab CI](gitlab-ci.md)
|
||||||
|
|
||||||
## Git hosted services
|
## Git hosted services
|
||||||
|
@ -1,95 +0,0 @@
|
|||||||
# Using semantic-release with [Travis CI build stages](https://docs.travis-ci.com/user/build-stages)
|
|
||||||
|
|
||||||
## Environment variables
|
|
||||||
|
|
||||||
The [Authentication](../usage/ci-configuration.md#authentication) environment variables can be configured in [Travis Repository Settings](https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-Settings) or with the [travis env set CLI](https://github.com/travis-ci/travis.rb#env).
|
|
||||||
|
|
||||||
Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with semantic-release-cli](../usage/ci-configuration.md#automatic-setup-with-semantic-release-cli).
|
|
||||||
|
|
||||||
## Multiple Node jobs configuration
|
|
||||||
|
|
||||||
### `.travis.yml` configuration for multiple Node jobs
|
|
||||||
|
|
||||||
This example is a minimal configuration for **semantic-release** with a build running Node 6 and 8. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
|
||||||
|
|
||||||
This example creates a `release` [build stage](https://docs.travis-ci.com/user/build-stages) that [runs `semantic-release` only after all test jobs are successful](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
|
|
||||||
|
|
||||||
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
|
||||||
|
|
||||||
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
|
||||||
|
|
||||||
**Advanced configuration**: Running the tests in the `script` step of the `release` stage is not necessary as the previous stage(s) already ran them. To increase speed, the `script` step of the `release` stage can be overwritten to skip the tests. Note that other commands such as build or compilation might still be required.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
language: node_js
|
|
||||||
|
|
||||||
node_js:
|
|
||||||
- 8
|
|
||||||
- 6
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# Define the release stage that runs semantic-release
|
|
||||||
- stage: release
|
|
||||||
node_js: lts/*
|
|
||||||
# Advanced: optionally overwrite your default `script` step to skip the tests
|
|
||||||
# script: skip
|
|
||||||
deploy:
|
|
||||||
provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script:
|
|
||||||
- npx semantic-release
|
|
||||||
```
|
|
||||||
|
|
||||||
### `package.json` configuration for multiple Node jobs
|
|
||||||
|
|
||||||
A `package.json` is required only for [local](../usage/installation.md#local-installation) **semantic-release** installation.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"devDependencies": {
|
|
||||||
"semantic-release": "^15.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Non-JavaScript projects configuration
|
|
||||||
|
|
||||||
For projects that require to be tested with one or multiple version of a Non-JavaScript [language](https://docs.travis-ci.com/user/languages), optionally on multiple [Operating Systems](https://docs.travis-ci.com/user/multi-os).
|
|
||||||
|
|
||||||
This recipe cover the Travis specifics only. See [Non JavaScript projects recipe](../support/FAQ.md#can-i-use-semantic-release-to-publish-non-javascript-packages) for more information on the **semantic-release** configuration.
|
|
||||||
|
|
||||||
### `.travis.yml` configuration for non-JavaScript projects
|
|
||||||
|
|
||||||
This example is a minimal configuration for **semantic-release** with a build running [Go 1.6 and 1.7](https://docs.travis-ci.com/user/languages/go). See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
|
||||||
|
|
||||||
This example creates a `release` [build stage](https://docs.travis-ci.com/user/build-stages) that [runs `semantic-release` only after all test jobs are successful](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
|
|
||||||
|
|
||||||
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
|
||||||
|
|
||||||
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
|
||||||
|
|
||||||
**Advanced configuration**: Running the tests in the `script` step of the `release` stage is not necessary as the previous stage(s) already ran them. To increase speed, the `script` step of the `release` stage can be overwritten to skip the tests. Note that other commands such as build or compilation might still be required.
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
language: go
|
|
||||||
|
|
||||||
go:
|
|
||||||
- 1.6
|
|
||||||
- 1.7
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
include:
|
|
||||||
# Define the release stage that runs semantic-release
|
|
||||||
- stage: release
|
|
||||||
# Advanced: optionally overwrite your default `script` step to skip the tests
|
|
||||||
# script:
|
|
||||||
# - make
|
|
||||||
deploy:
|
|
||||||
provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script:
|
|
||||||
# Use nvm to install and use the Node LTS version (nvm is installed on all Travis images)
|
|
||||||
- nvm install lts/*
|
|
||||||
- npx semantic-release
|
|
||||||
```
|
|
@ -4,62 +4,22 @@
|
|||||||
|
|
||||||
The [Authentication](../usage/ci-configuration.md#authentication) environment variables can be configured in [Travis Repository Settings](https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-Settings) or with the [travis env set CLI](https://github.com/travis-ci/travis.rb#env).
|
The [Authentication](../usage/ci-configuration.md#authentication) environment variables can be configured in [Travis Repository Settings](https://docs.travis-ci.com/user/environment-variables/#defining-variables-in-repository-Settings) or with the [travis env set CLI](https://github.com/travis-ci/travis.rb#env).
|
||||||
|
|
||||||
Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with semantic-release-cli](../usage/ci-configuration.md#automatic-setup-with-semantic-release-cli).
|
Alternatively, the default `NPM_TOKEN` and `GH_TOKEN` can be easily [setup with semantic-release-cli](../usage/getting-started.md#getting-started).
|
||||||
|
|
||||||
## Single Node job configuration
|
## Node.js projects configuration
|
||||||
|
|
||||||
For projects that require to be tested only with a single [Node version](https://docs.travis-ci.com/user/getting-started/#Selecting-a-different-programming-language) on [one Operating System](https://docs.travis-ci.com/user/getting-started/#Selecting-infrastructure-(optional)).
|
### `.travis.yml` configuration for multiple Node.js jobs
|
||||||
|
|
||||||
**Note**: [Node 8 is the minimal version required](../support/FAQ.md#why-does-semantic-release-require-node-version--83).
|
|
||||||
|
|
||||||
### `.travis.yml` configuration for single Node job
|
|
||||||
|
|
||||||
This example is a minimal configuration for semantic-release with a build running Node 8 on Linux. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
|
||||||
|
|
||||||
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
|
||||||
|
|
||||||
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
language: node_js
|
|
||||||
|
|
||||||
node_js: 8
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
provider: script
|
|
||||||
skip_cleanup: true
|
|
||||||
script:
|
|
||||||
- npx semantic-release
|
|
||||||
```
|
|
||||||
|
|
||||||
### `package.json` configuration for single Node job
|
|
||||||
|
|
||||||
A `package.json` is required only for [local](../usage/installation.md#local-installation) **semantic-release** installation.
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"devDependencies": {
|
|
||||||
"semantic-release": "^11.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
## Multiple Node jobs configuration
|
|
||||||
|
|
||||||
For projects that require to be tested with multiple [Node versions](https://docs.travis-ci.com/user/languages/javascript-with-nodejs/#Specifying-Node.js-versions) and/or on multiple [Operating Systems](https://docs.travis-ci.com/user/multi-os).
|
|
||||||
|
|
||||||
**Note**: At least one job must run a [Node >= 8 version](../support/FAQ.md#why-does-semantic-release-require-node-version--83).
|
|
||||||
|
|
||||||
### `.travis.yml` configuration for multiple Node jobs
|
|
||||||
|
|
||||||
This example is a minimal configuration for **semantic-release** with a build running Node 6 and 8. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
This example is a minimal configuration for **semantic-release** with a build running Node 6 and 8. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
||||||
|
|
||||||
This example uses [`travis-deploy-once`](https://github.com/semantic-release/travis-deploy-once) in order to [Run `semantic-release` only after all tests succeeded](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded). Alternatively you can use [Travis CI Build Stages recipe](travis-build-stages.md).
|
This example creates a `release` [build stage](https://docs.travis-ci.com/user/build-stages) that [runs `semantic-release` only after all test jobs are successful](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
|
||||||
|
|
||||||
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
||||||
|
|
||||||
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
||||||
|
|
||||||
|
**Advanced configuration**: Running the tests in the `script` step of the `release` stage is not necessary as the previous stage(s) already ran them. To increase speed, the `script` step of the `release` stage can be overwritten to skip the tests. Note that other commands such as build or compilation might still be required.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
language: node_js
|
language: node_js
|
||||||
|
|
||||||
@ -67,15 +27,20 @@ node_js:
|
|||||||
- 8
|
- 8
|
||||||
- 6
|
- 6
|
||||||
|
|
||||||
deploy:
|
jobs:
|
||||||
provider: script
|
include:
|
||||||
skip_cleanup: true
|
# Define the release stage that runs semantic-release
|
||||||
script:
|
- stage: release
|
||||||
- npx travis-deploy-once "npx semantic-release"
|
node_js: lts/*
|
||||||
|
# Advanced: optionally overwrite your default `script` step to skip the tests
|
||||||
|
# script: skip
|
||||||
|
deploy:
|
||||||
|
provider: script
|
||||||
|
skip_cleanup: true
|
||||||
|
script:
|
||||||
|
- npx semantic-release
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: See the `travis-deploy-once` [`pro`](https://github.com/semantic-release/travis-deploy-once#-p---pro) and [`travis-url`](https://github.com/semantic-release/travis-deploy-once#-u---travis-url) options for using with [Travis Pro](https://docs.travis-ci.com/user/travis-pro) and [Travis Enterprise](https://enterprise.travis-ci.com).
|
|
||||||
|
|
||||||
### `package.json` configuration for multiple Node jobs
|
### `package.json` configuration for multiple Node jobs
|
||||||
|
|
||||||
A `package.json` is required only for [local](../usage/installation.md#local-installation) **semantic-release** installation.
|
A `package.json` is required only for [local](../usage/installation.md#local-installation) **semantic-release** installation.
|
||||||
@ -83,13 +48,12 @@ A `package.json` is required only for [local](../usage/installation.md#local-ins
|
|||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"semantic-release": "^15.0.0",
|
"semantic-release": "^15.0.0"
|
||||||
"travis-deploy-once": "^5.0.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
## Non-JavaScript projects configuration
|
## Non-Node.js projects configuration
|
||||||
|
|
||||||
For projects that require to be tested with one or multiple version of a Non-JavaScript [language](https://docs.travis-ci.com/user/languages), optionally on multiple [Operating Systems](https://docs.travis-ci.com/user/multi-os).
|
For projects that require to be tested with one or multiple version of a Non-JavaScript [language](https://docs.travis-ci.com/user/languages), optionally on multiple [Operating Systems](https://docs.travis-ci.com/user/multi-os).
|
||||||
|
|
||||||
@ -97,14 +61,16 @@ This recipe cover the Travis specifics only. See [Non JavaScript projects recipe
|
|||||||
|
|
||||||
### `.travis.yml` configuration for non-JavaScript projects
|
### `.travis.yml` configuration for non-JavaScript projects
|
||||||
|
|
||||||
This example is a minimal configuration for **semantic-release** with a build running [Go 1.6 and 1.7](https://docs.travis-ci.com/user/languages/go) on Linux and OSX. See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
This example is a minimal configuration for **semantic-release** with a build running [Go 1.6 and 1.7](https://docs.travis-ci.com/user/languages/go). See [Travis - Customizing the Build](https://docs.travis-ci.com/user/customizing-the-build) for additional configuration options.
|
||||||
|
|
||||||
This example uses [`travis-deploy-once`](https://github.com/semantic-release/travis-deploy-once) in order to [run `semantic-release` only after all tests succeeded](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded). Alternatively you can use [Travis CI Build Stages recipe](travis-build-stages.md).
|
This example creates a `release` [build stage](https://docs.travis-ci.com/user/build-stages) that [runs `semantic-release` only after all test jobs are successful](../usage/ci-configuration.md#run-semantic-release-only-after-all-tests-succeeded).
|
||||||
|
|
||||||
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
It's recommended to run the `semantic-release` command in the [Travis `deploy` step](https://docs.travis-ci.com/user/customizing-the-build/#The-Build-Lifecycle) so if an error occurs the build will fail and Travis will send a notification.
|
||||||
|
|
||||||
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
**Note**: It's not recommended to run the `semantic-release` command in the Travis `script` step as each script in this step will be executed regardless of the outcome of the previous one. See [travis-ci/travis-ci#1066](https://github.com/travis-ci/travis-ci/issues/1066).
|
||||||
|
|
||||||
|
**Advanced configuration**: Running the tests in the `script` step of the `release` stage is not necessary as the previous stage(s) already ran them. To increase speed, the `script` step of the `release` stage can be overwritten to skip the tests. Note that other commands such as build or compilation might still be required.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
language: go
|
language: go
|
||||||
|
|
||||||
@ -112,18 +78,18 @@ go:
|
|||||||
- 1.6
|
- 1.6
|
||||||
- 1.7
|
- 1.7
|
||||||
|
|
||||||
os:
|
jobs:
|
||||||
- linux
|
include:
|
||||||
- osx
|
# Define the release stage that runs semantic-release
|
||||||
|
- stage: release
|
||||||
deploy:
|
# Advanced: optionally overwrite your default `script` step to skip the tests
|
||||||
provider: script
|
# script:
|
||||||
skip_cleanup: true
|
# - make
|
||||||
script:
|
deploy:
|
||||||
# Use nvm to install and use the Node LTS version (nvm is installed on all Travis images)
|
provider: script
|
||||||
- nvm install lts/*
|
skip_cleanup: true
|
||||||
# Run semantic-release only on one job, after all other are successful
|
script:
|
||||||
- npx travis-deploy-once "npx semantic-release"
|
# Use nvm to install and use the Node LTS version (nvm is installed on all Travis images)
|
||||||
|
- nvm install lts/*
|
||||||
|
- npx semantic-release
|
||||||
```
|
```
|
||||||
|
|
||||||
**Note**: See the `travis-deploy-once` [`pro`](https://github.com/semantic-release/travis-deploy-once#-p---pro) and [`travis-url`](https://github.com/semantic-release/travis-deploy-once#-u---travis-url) options for using with [Travis Pro](https://docs.travis-ci.com/user/travis-pro) and [Travis Enterprise](https://enterprise.travis-ci.com).
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Run `semantic-release` only after all tests succeeded
|
## Run `semantic-release` only after all tests succeeded
|
||||||
|
|
||||||
The `semantic-release` command must be executed only after all the tests in the CI build pass. If the build runs multiple jobs (for example to test on multiple Operating Systems or Node versions) the CI has to be configured to guarantee that the `semantic-release` command is executed only after all jobs are successful. This can be achieved with [Travis Build Stages](https://docs.travis-ci.com/user/build-stages), [CircleCI Workflows](https://circleci.com/docs/2.0/workflows), [Codeship Deployment Pipelines](https://documentation.codeship.com/basic/builds-and-configuration/deployment-pipelines), [GitLab Pipelines](https://docs.gitlab.com/ee/ci/pipelines.html#introduction-to-pipelines-and-jobs), [Codefresh Pipelines](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines), [Wercker Workflows](http://devcenter.wercker.com/docs/workflows), [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline) or specific tools like [`travis-deploy-once`](https://github.com/semantic-release/travis-deploy-once).
|
The `semantic-release` command must be executed only after all the tests in the CI build pass. If the build runs multiple jobs (for example to test on multiple Operating Systems or Node versions) the CI has to be configured to guarantee that the `semantic-release` command is executed only after all jobs are successful. This can be achieved with [Travis Build Stages](https://docs.travis-ci.com/user/build-stages), [CircleCI Workflows](https://circleci.com/docs/2.0/workflows), [Codeship Deployment Pipelines](https://documentation.codeship.com/basic/builds-and-configuration/deployment-pipelines), [GitLab Pipelines](https://docs.gitlab.com/ee/ci/pipelines.html#introduction-to-pipelines-and-jobs), [Codefresh Pipelines](https://codefresh.io/docs/docs/configure-ci-cd-pipeline/introduction-to-codefresh-pipelines), [Wercker Workflows](http://devcenter.wercker.com/docs/workflows) or [GoCD Pipelines](https://docs.gocd.org/current/introduction/concepts_in_go.html#pipeline).
|
||||||
|
|
||||||
See [CI configuration recipes](../recipes/README.md#ci-configurations) for more details.
|
See [CI configuration recipes](../recipes/README.md#ci-configurations) for more details.
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user