Skip to content

Commit 037c651

Browse files
committed
fix(release): fix the automatic release using the ci
1 parent 2662d46 commit 037c651

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

.releaserc.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,16 @@ module.exports = {
66
[
77
'@semantic-release/exec',
88
{
9-
prepareCmd: 'sed -i \'\' \'s/"version": ".*"/"version": "${nextRelease.version}"/g\' package.json; sed -i \'\' \'s/VERSION = ".*"/VERSION = "${nextRelease.version}"/g\' lib/forest_liana/version.rb;',
9+
prepareCmd: 'sed -i \'s/forest_liana (.*)/forest_liana (${nextRelease.version})/g\' Gemfile.lock; sed -i \'s/VERSION = ".*"/VERSION = "${nextRelease.version}"/g\' lib/forest_liana/version.rb; sed -i \'s/"version": ".*"/"version": "${nextRelease.version}"/g\' package.json;',
1010
successCmd: 'touch .trigger-rubygem-release',
1111
},
1212
],
13-
'@semantic-release/git',
13+
[
14+
'@semantic-release/git',
15+
{
16+
assets: ['CHANGELOG.md', 'Gemfile.lock', 'lib/forest_liana/version.rb', 'package.json'],
17+
},
18+
],
1419
'@semantic-release/github',
1520
[
1621
'semantic-release-slack-bot',

.travis.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,3 @@
1-
language: ruby
2-
3-
before_install:
4-
- gem install bundler -v '1.17.3'
5-
6-
rvm: 2.3.4
7-
81
stages:
92
- Lint commit messages
103
- Tests
@@ -17,15 +10,23 @@ jobs:
1710
node_js: lts/*
1811
before_install:
1912
- nvm install lts/*
20-
- npm install
13+
- yarn
2114
script: commitlint-travis
2215
- stage: Tests
16+
language: ruby
17+
before_install: gem install bundler -v '1.17.3'
18+
rvm: 2.3.4
2319
script:
2420
- RAILS_ENV=test bundle exec rake test
2521
- RAILS_ENV=test bundle exec rake db:migrate && bundle exec rspec --color --format doc
2622
- stage: Build & Publish
2723
if: branch = master AND type != pull_request
28-
script: yarn && npx semantic-release
24+
language: node_js
25+
node_js: lts/*
26+
before_install:
27+
- nvm install lts/*
28+
- yarn
29+
script: npx semantic-release
2930
deploy:
3031
provider: rubygems
3132
api_key: $RUBYGEMS_TOKEN

0 commit comments

Comments
 (0)