@eclass/semantic-release-now
v3.0.0
Published
semantic-release plugin to deploy app with now.sh
Downloads
70
Readme
@eclass/semantic-release-now
semantic-release plugin to deploy app with now.sh
| Step | Description |
|--------------------|--------------------------------------------------------------|
| verifyConditions
| Verify the presence of the NOW_TOKEN
environment variable. |
| publish
| Upload assets to now.sh. |
Install
npm i -D @eclass/semantic-release-now
Usage
The plugin can be configured in the semantic-release configuration file:
{
"plugins": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/gitlab",
"@eclass/semantic-release-now"
]
}
Configuration
Now authentication
The now authentication configuration is required and can be set via environment variables.
Environment variables
| Variable | Description |
| ----------- | --------------------------------------------------------------------------------------- |
| NOW_TOKEN
| Now token created via now token |
Now CLI
Is required install now cli in CI.
Examples
{
"plugins": [
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/git",
"@semantic-release/gitlab",
"@eclass/semantic-release-now"
]
}
{
"version": 2,
"name": "my-awesome-project",
"builds": [
{
"src": "build/**/*",
"use": "@now/static"
}
],
"routes": [
{
"src": "/(.*)",
"headers": {
"cache-control": "s-maxage=0"
},
"dest": "build/index.html"
}
],
"alias": ["my-awesome-project.now.sh"]
}
# .gitlab-ci.yml
release:
image: node:11-alpine
stage: release
before_script:
- npm i -g --unsafe-perm now
script:
- npx semantic-release
only:
- master
# .travis.yml
language: node_js
cache:
directories:
- ~/.npm
node_js:
- "11"
stages:
- test
- name: deploy
if: branch = master
jobs:
include:
- stage: test
script: npm t
- stage: deploy
before_script:
- npm i -g --unsafe-perm now
script: npx semantic-release