Skip to content

Commit 0b60188

Browse files
authored
Merge pull request #26 from Arcanemagus/semantic-release
Automated Deployment with semantic-release
2 parents 7f52996 + a83488d commit 0b60188

File tree

6 files changed

+4279
-939
lines changed

6 files changed

+4279
-939
lines changed

.github_changelog_generator

Lines changed: 0 additions & 5 deletions
This file was deleted.

.npmignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
__tests__/*
33
.circleci/*
44
coverage/*
5+
.gitattributes
6+
.gitignore
57
.npmignore
68
.travis.yml
7-
.gitignore
8-
.gitattributes
9-
.github_changelog_generator
9+
git_deploy_key.enc

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
language: node_js
22
os: linux
3+
node_js: lts/*
34

45
jobs:
56
include:
@@ -8,6 +9,29 @@ jobs:
89
- stage: test
910
node_js: node
1011

12+
# Check the commit messages
13+
- stage: test
14+
script:
15+
- commitlint-travis
16+
17+
- stage: release
18+
before_deploy:
19+
# Decrypt the git_deploy_key.enc key into /tmp/git_deploy_key
20+
- openssl aes-256-cbc -K $encrypted_5690340abf23_key -iv $encrypted_5690340abf23_iv -in git_deploy_key.enc -out /tmp/git_deploy_key -d
21+
# Make sure only the current user can read the private key
22+
- chmod 600 /tmp/git_deploy_key
23+
# Create a script to return the passphrase environment variable to ssh-add
24+
- echo 'echo ${SSH_PASSPHRASE}' > /tmp/askpass && chmod +x /tmp/askpass
25+
# Start the authentication agent
26+
- eval "$(ssh-agent -s)"
27+
# Add the key to the authentication agent
28+
- DISPLAY=":0.0" SSH_ASKPASS="/tmp/askpass" setsid ssh-add /tmp/git_deploy_key </dev/null
29+
deploy:
30+
provider: script
31+
skip_cleanup: true
32+
script:
33+
- npx semantic-release
34+
1135
notifications:
1236
email:
1337
on_success: never
@@ -27,3 +51,5 @@ sudo: false
2751

2852
stages:
2953
- test
54+
- name: release
55+
if: (NOT type = pull_request) AND branch = master

git_deploy_key.enc

3.25 KB
Binary file not shown.

0 commit comments

Comments
 (0)