diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fe0b5c3..5868022 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,6 +3,7 @@ image: node:11 stages: - integration - acceptance + - release - deployment ## TESTING ## @@ -94,6 +95,18 @@ stg2: tags: - deploy +## RELEASE TAGGING ## + +publish: + stage: release + script: + - npm install -g semantic-release@v17 @semantic-release/gitlab + - semantic-release + only: + - master + tags: + - deploy + ## LIVE DEPLOYMENTS ## alpha: diff --git a/package.json b/package.json index 690a0d3..903d0b9 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,10 @@ "name": "sib-app", "version": "1.0.0", "license": "MIT", + "repository": { + "type": "git", + "url": "https://git.startinblox.com/applications/sib-app.git" + }, "scripts": { "build": "run-p copy:* build:*", "build:css": "node-sass src/styles/index.scss -o dist/styles/", @@ -15,6 +19,35 @@ "watch:js": "babel --watch \"src/scripts/*.js\" -o dist/scripts/index.js", "watch:pug": "pug --watch src/index.pug -o dist/ --obj config.json" }, + "release": { + "branches": [ + "master" + ], + "plugins": [ + [ + "@semantic-release/commit-analyzer", + { + "preset": "angular", + "releaseRules": [ + { + "type": "major", + "release": "major" + }, + { + "type": "minor", + "release": "minor" + }, + { + "type": "*", + "release": "patch" + } + ] + } + ], + "@semantic-release/release-notes-generator", + "@semantic-release/gitlab" + ] + }, "dependencies": { "@babel/cli": "^7.7.0", "@babel/core": "^7.7.0",