@@ -33,34 +33,40 @@ jobs:
33
33
include :
34
34
- stage : run on pull requests
35
35
script :
36
- - docker run $ci_env -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && npm run lint && npm run codecov && ROUTER_MODE=history npm run build"
36
+ - docker run $ci_env -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install
37
+ && npm run lint && npm run codecov && ROUTER_MODE=history npm run build"
37
38
- stage : add to codecov
38
39
script :
39
- - docker run $ci_env -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && npm run codecov"
40
+ - docker run $ci_env -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install
41
+ && npm run codecov"
40
42
- stage : add to mewbuilds staging
41
43
before_script :
42
- - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && ROUTER_MODE=history npm run build"
44
+ - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install &&
45
+ ROUTER_MODE=history npm run build"
43
46
- pip install --user awscli
44
47
script :
45
48
- aws s3 rm s3://mewbuilds/staging/ --recursive
46
49
- aws s3 sync --acl public-read dist/ s3://mewbuilds/staging/
47
50
- stage : add to mewbuilds develop
48
51
before_script :
49
- - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && ROUTER_MODE=history npm run build"
52
+ - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install &&
53
+ ROUTER_MODE=history npm run build"
50
54
- pip install --user awscli
51
55
script :
52
56
- aws s3 rm s3://mewbuilds/develop/ --recursive
53
57
- aws s3 sync --acl public-read dist/ s3://mewbuilds/develop/
54
58
- stage : add to mewbuilds
55
59
before_script :
56
- - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && ROUTER_MODE=hash npm run build"
60
+ - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install &&
61
+ ROUTER_MODE=hash npm run build"
57
62
- pip install --user awscli
58
63
- ssh-keyscan -H $IPFS_NODE >> $HOME/.ssh/known_hosts
59
64
script :
60
65
- openssl aes-256-cbc -K $encrypted_2bd32a0810e2_key -iv $encrypted_2bd32a0810e2_iv
61
66
-in ipfs-host.pem.enc -out ipfs-host.pem -d
62
67
- chmod 400 ipfs-host.pem
63
- - hashOut=`tar -cjvf - -C dist/ . | ssh -i ipfs-host.pem ubuntu@$IPFS_NODE ./ipfs-publish.sh --`
68
+ - hashOut=`tar -cjvf - -C dist/ . | ssh -i ipfs-host.pem ubuntu@$IPFS_NODE ./ipfs-publish.sh
69
+ --`
64
70
- HASH=`echo $hashOut | sed -n 's:.*<hash>\(.*\)</hash>.*:\1:p'`
65
71
- aws s3 sync --acl public-read dist/ s3://mewbuilds/build/$TRAVIS_COMMIT
66
72
after_success :
@@ -73,25 +79,19 @@ jobs:
73
79
script : skip
74
80
before_deploy :
75
81
- docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && ROUTER_MODE=hash npm run build"
76
- - sudo mkdir deploy
77
- - ls -a /dist | sort
78
- - |
79
- PACKAGE_VERSION=$(cat package.json \
80
- | grep version \
81
- | head -1 \
82
- | awk -F: '{ print $2 }' \
83
- | sed 's/[",]//g' \
84
- | tr -d '[[:space:]]'); sudo zip -r ./deploy/release-"$PACKAGE_VERSION".zip ./dist; git tag v$PACKAGE_VERSION
82
+ - openssl aes-256-cbc -K $encrypted_2bd32a0810e2_key -iv $encrypted_2bd32a0810e2_iv -in mew_sec.gpg.enc -out mew.gpg -d
83
+ - gpg --allow-secret-key-import --import mew.gpg
85
84
deploy :
86
- provider : releases
87
- api_key : ' $GITHUB_TOKEN'
88
- file : deploy/*
89
- file_glob : true
85
+ provider : script
86
+ script : bash ./release.sh $TRAVIS_TAG $GITHUB_TOKEN $TRAVIS_REPO_SLUG true
90
87
skip_cleanup : true
88
+ on :
89
+ tags : true
90
+ branch : master
91
91
- stage : deploy to production
92
92
script : skip
93
93
before_deploy :
94
- - bash ./deploy.sh
94
+ - docker run -v `pwd`:/home:rw mew-build-container /bin/bash -c "npm install && ROUTER_MODE=hash npm run build"
95
95
deploy :
96
96
provider : pages
97
97
skip-cleanup : true
@@ -100,4 +100,5 @@ jobs:
100
100
local-dir : ' ./dist'
101
101
on :
102
102
branch : master
103
+ tags : true
103
104
target-branch : gh-pages
0 commit comments