Commit a8c9c81c authored by lutangar's avatar lutangar
Browse files

chore: setup Continuous Delivery and hooks

parent ce32b94b
Pipeline #4279 failed with stage
in 9 seconds
default:
image: node:latest
before_script:
- npm ci --cache .npm --prefer-offline
- |
{
echo "@${CI_PROJECT_ROOT_NAMESPACE}:registry=${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/npm/"
echo "${CI_API_V4_URL#https?}/projects/${CI_PROJECT_ID}/packages/npm/:_authToken=\${CI_JOB_TOKEN}"
} | tee --append .npmrc
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- .npm/
workflow:
rules:
- if: $CI_COMMIT_BRANCH
variables:
NPM_TOKEN: ${CI_JOB_TOKEN}
stages:
- release
publish:
stage: release
script:
- npm run semantic-release
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npx --no-install commitlint --edit "$1"
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
npm run prettier
{
"branches": ["master"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/gitlab",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json"],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
module.exports = { extends: ['@commitlint/config-conventional'] };
......@@ -6,8 +6,14 @@
"peertube": ">=3.2.0"
},
"scripts": {
"prettier": "prettier --write main.js 'server/**/*.js'"
"prepare": "husky install",
"semantic-release": "semantic-release",
"prettier": "prettier --write main.js commitlint.config.js 'server/**/*.js'"
},
"publishConfig": {
"access": "public"
},
"files": ["main.js", "server/", "languages/"],
"keywords": [
"peertube",
"plugin",
......@@ -24,6 +30,13 @@
"en": "./languages/en.json"
},
"devDependencies": {
"prettier": "^2.3.1"
"@commitlint/cli": "^12.1.4",
"@commitlint/config-conventional": "^12.1.4",
"@semantic-release/git": "^9.0.0",
"@semantic-release/gitlab": "^6.1.0",
"@semantic-release/npm": "^7.1.3",
"husky": "^6.0.0",
"prettier": "^2.3.1",
"semantic-release": "^17.4.4"
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment