-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
54 lines (45 loc) · 1.5 KB
/
wercker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
box: darklumos/ng-headless-wercker
test:
steps:
- npm-install
- script:
name: test
code: |
npm test
- script:
name: coverage
code: |
npm run cov
deploy-github:
steps:
- script:
name: bump version
code: |
export APP_VERSION=$(sed -n 's|"version": "\([[:digit:]].[[:digit:]].[[:digit:]]\)",|\1|p' package.json)
export APP_VERSION_MAJ_MIN=$(echo $APP_VERSION | cut -d . -f -2)
export APP_VERSION_BUILD=$(echo $APP_VERSION | cut -d . -f 3)
export APP_VERSION="${APP_VERSION_MAJ_MIN}.${APP_VERSION_BUILD}"
export NEW_APP_VERSION="${APP_VERSION_MAJ_MIN}.$(expr $APP_VERSION_BUILD + 1)"
echo "Replacing ${APP_VERSION} with ${NEW_APP_VERSION}"
sed -i -e "s|\"version\": \"${APP_VERSION}\"|\"version\": \"${NEW_APP_VERSION}\"|g" package.json
- script:
name: commit version bump
code: |
git config user.email "deploy@darklumos.io"
git config user.name "Wercker CI"
git config push.default simple
git add package.json
git commit -m "CI Bump version [skip ci]"
- leipert/git-push@0.7.6:
gh_oauth: ${GITHUB_TOKEN}
- github-create-release:
token: $GITHUB_TOKEN
target-commitish: ${WERCKER_GIT_BRANCH}
tag: v${NEW_APP_VERSION}
title: EDIT ME - CI Deployment
body: "
Changelog:
*
"
draft: true
prerelease: true