
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@semantic-release/condition-travis
Advanced tools
semantic-release plugin to check Travis CI environment before publishing.
Verify that semantic-release
is running:
Option | Description | Default |
---|---|---|
githubToken | Required. The Github token used to authenticate with Travis API. | process.env.GH_TOKEN or process.env.GITHUB_TOKEN |
githubUrl | The GitHub Enterprise endpoint. | process.env.GH_URL or process.env.GITHUB_URL |
githubApiPathPrefix | The GitHub Enterprise API prefix. | process.env.GH_PREFIX or process.env.GITHUB_PREFIX |
travisUrl | The Travis Enterprise endpoint. | process.env.TRAVIS_URL |
The plugin is used by default by semantic-release so no specific configuration is required if githubToken
, githubUrl
, githubApiPathPrefix
and travisUrl
are set via environment variable.
semantic-release
require Node node version >= 8, so at least one Travis job as to run on Node 8 (or greater).
No specific configuration is required. semantic-release
will run on the only Travis job.
language: node_js
node_js:
- 8
after_success:
- npm run semantic-release
If there are multiple Node versions and OSs configured, travis-deploy-once will guarantee that semantic-release
is executed on the highest Node version, after all other jobs are successful, without any additional configurations.
language: node_js
node_js:
- 8
- 6
- 4
os:
- linux
- osx
after_success:
- npm run semantic-release
In this example Travis will run 6 jobs (Node 8/Linux, Node 8/ OSX, Node 6/Linux etc...) and semantic-release
will be executed on Node 8 on Linux, only after the 5 other jobs are successful.
Travis support Build Stages for more complex workflows. It's possible to use semantic-release
with Build Stages by configuring the environment variable BUILD_LEADER_ID
to defined which job will run semantic-release
.
The build stage configuration has to guarantee that the job configured with BUILD_LEADER_ID
will run only after all other jobs are successful.
language: node_js
node_js:
- 8
- 6
- 4
os:
- linux
- osx
env:
- BUILD_LEADER_ID=7
jobs:
include:
- stage: release
node_js: 8
os: linux
after_success:
- npm run semantic-release
In this example Travis will run 6 jobs in the default stage (Node 4, 6 and 8 on Linux and OSX) and if those 6 jobs are successful the release stage will run the 7th job (on Node 8 / Linux) that will execute semantic-release
.
The environment variable BUILD_LEADER_ID
is set to 7
as semantic-release
should run on the 7th job.
FAQs
Check Travis CI environment before publishing
The npm package @semantic-release/condition-travis receives a total of 3,841 weekly downloads. As such, @semantic-release/condition-travis popularity was classified as popular.
We found that @semantic-release/condition-travis demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.