1 | image: registry.gitlab.com/ecloud/ci-runners/native:2_0_0
|
2 |
|
3 | stages:
|
4 | - release
|
5 |
|
6 | before_script:
|
7 | - npm install
|
8 |
|
9 | publish:
|
10 | stage: release
|
11 | script:
|
12 | - |
|
13 | BEFORE=$( npx -c 'echo "$npm_package_version"' )
|
14 | npx semantic-release
|
15 | AFTER=$( npx -c 'echo "$npm_package_version"' )
|
16 | if [[ $BEFORE != $AFTER ]]; then
|
17 | LAST_COMMIT=$( git rev-parse HEAD ) && git checkout master && git merge $LAST_COMMIT
|
18 | git remote add gitlab https://oauth2:$GLB_TOKEN@gitlab.com/$CI_PROJECT_PATH.git
|
19 | git push gitlab master
|
20 | LAST_VERSION=$( git describe --tags ) && git push gitlab $LAST_VERSION
|
21 | fi
|
22 | only:
|
23 | - master |
\ | No newline at end of file |