The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

Automating Releases with semantic-release

Automating Releases with semantic-release

5:49
There are so many repeated steps when releasing a new version of a library. The tool semantic-release automates this process by pushing off the responsibility of your releases to continuous integration. Trust us, this will change your workflow for the better.
Watch this lesson now
Avatar
egghead.io

There are so many repeated steps when releasing a new version of a library. The tool semantic-release automates this process by pushing off the responsibility of your releases to continuous integration. Trust us, this will change your workflow for the better.

Avatar
LOGESH KUMAR

Hi,

After I choose Tarvis CI, I am getting this error in console.

ERR! semantic-release Could not get repository on Travis CI.
ERR! semantic-release { file: 'not found' }

In reply to egghead.io
Avatar
David

I got the same thing. I went to https://travis-ci.org and created an account (authorization via github), and it worked afterwards.

In reply to LOGESH KUMAR
Avatar
Kent C.

Ah! I must have missed that because I've had a travis account for a long time and I didn't think about it. Sorry about that! You might think about filing an issue to improve this experience on https://github.com/semantic-release/semantic-release

In reply to David
Avatar
LOGESH KUMAR

But I have an account in https://travis-ci.org already and I can see my github repositories listed there. I have also enabled the repository I am working on in travis. I am still getting the same error. I am using Ubuntu 14.04 , nmp - v2.11.2 and node v0.12.6.

In reply to David
Avatar
Kent C.

Hmm... That's odd. I would recommend you reach out to the semantic-release project on github and see if they can help you troubleshoot. You might also try emailing support@travis-ci.com

In reply to LOGESH KUMAR
Avatar
Juanmnl Cornejo

I'm having a problem on travis build. It stalls while launching the tests. I'm sure the -w flag is responsible so i removed it. I've pushed the changes to github, but when relaunching the build on travis, the test command still has the -w flag.
How do i update the github project on travis. (tried removing and adding again w/ no success)

Avatar
Kent C.

I actually recommend that your test script not have the -w flag (even though that's what I originally did in the video) and in your .travis.yml, make sure that your script runs npm run test. I do in angular-formly

Good luck!

In reply to Juanmnl Cornejo
Avatar
Juanmnl Cornejo

Hey! Thanks for the quick answer! Everything worked after waiting a bit (the new commit arrived and everything went green).
Guess i'll wait for the commit to propagate next time :)

In reply to Kent C.
Avatar
Leo

Hi Kent, thanks a lot for sharing this amazing library. I just have 2 steps that I'm struggling with.

1) I use gulp-header that reads my package.json to insert the correct version as annotations in my .min.js, however, semantic-release don't let any version into the package.json, do you have an alternative, for it? Thanks?

2) How would publish bower? Do I need to create a tag on my own? Thanks

Avatar
Kent C.

Hi Leo! So... Two things

1) Just run gulp-header after semantic-release pre. You'll see that I changed the semantic-release script in angular-formly here. semantic-release pre will set the version in package.json.
2) Don't publish to bower. It's dead. However, semantic-release does create a tag for you, so it should just work out of the box.

In reply to Leo
Avatar
Leo

Hi Kent,

Many thanks for your reply.

1) Allright, I'll run semantic-release pre, than gulp-header. That's really cool. I just need to make sure all my PR helpers use the correct commit messages convention. (I found out you wrote a lib to force that, I'll try it)

2) I've read about replace bower to npm, however this won't be done to quickly. I'm still have many users from bower in my lib. I realized that created a tag. It should be fine though.

Awesome video btw!

In reply to Kent C.
Avatar
RanchardZ

I have the same problem with LOGESH KUMAR. Login Travis CI with my github account and sync the repos. I add the .travis.yml myself and it works on travisCI. But when I run semantic-release-ci setup..The same error messages show up.

In reply to egghead.io
Avatar
RanchardZ

it's my mistake..But, maybe other friends would come across the same problem following this lecture. If we follow the lecture's instructions strictly and create same warstars-names repo on our github. we are not allowed to publish our repo on npm..so there I change my repo name to myname-warstars-names. This is where the problem lies...We need to change our package.json too. because the settings there remain the same with warstars-names instead of myname-warstarts-names...

In reply to RanchardZ
Avatar
RanchardZ

see my last post.~maybe your problem is similar with mine.

In reply to LOGESH KUMAR
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?