title: Handling nextRelease version in semantic release
body: <p>so I have been reading the docs and kind of got a glimpse of 
  <em>what</em> I should do, but no real grasp of <em>how</em> I can do it.</p>
  
  <p>Here is my problem:
  - I am using semantic release to publish my package to npm
  - I also have contract testing in place with Pact.
  - I would like my Pacts published after the release, if successful, with the same version as the new version</p>
  
  <p>How can I do that easily?</p>
  
  <p>I have looked at the docs, and understood that I could use the <code>exec</code> plugin, however, I find it not clear how I should configure semantic-release to behave exactly the same as now, only exposing the version as, at the very least, an env variable, and couldn't find examples of people doing that.</p>
  
  <p>I could use hooks, but I am concerned that if a npm publish does not happen for some reasons, I would still get my pact published with the next version, which wouldn't exactly exist. Any suggestions here?</p>
  
  <p>It seems I could also write my own JS script (see <a href="https://github.com/semantic-release/semantic-release/blob/3cc62f0318ff8917fcdc7cebe890da9dbaa7b3f9/docs/developer-guide/js-api.md" rel="nofollow noreferrer">https://github.com/semantic-release/semantic-release/blob/3cc62f0318ff8917fcdc7cebe890da9dbaa7b3f9/docs/developer-guide/js-api.md</a>) to do this as well as handling the version, but I am not certain what this example does and what it covers regarding the current behaviour.</p>
  
  <p>I guess I could also write my own pact plugin too, but that's even more next level into having to understand how the internals of semantic-release work.</p>
  
  <p>So I am after some examples/experience sharing, and maybe an easy-peasy solution to have that working in less than 30 minutes :)</p>
  
  <p>Thanks</p>
  
  <p>PS: sorry for posting here, but it seems the issues of semantic-release are not really made for support questions.</p>