Skip to content

Commit

Permalink
Merge pull request #3 from conveyal/dev
Browse files Browse the repository at this point in the history
Add missing steps to README
  • Loading branch information
evansiroky authored Feb 10, 2018
2 parents 7a57de2 + 79e62ec commit a8a0448
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 2 deletions.
1 change: 1 addition & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.gitignore
.travis.yml
github-token-example.png
node_modules
yarn.lock
22 changes: 20 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Follow [this guide](http://central.sonatype.org/pages/ossrh-guide.html#initial-s

### Step 2: Make sure your pom.xml file is ready to be released

<span style="font-size:larger;">[See this example project for a sample pom.xml](https://github.com/evansiroky/maven-semantic-release-example/blob/master/pom.xml).</span>

Your maven project needs to have at least the following items in your pom.xml:

- `name` - the name of the project
Expand All @@ -28,15 +30,25 @@ Your maven project needs to have at least the following items in your pom.xml:
- `developers` - who worked on the project
- `distributionManagement` - the places where you want to distribute your project to

You need to have the following maven plugins included in your pom.xml as well:
#### Plugins

Your pom.xml file needs to have the following maven plugins included:

- `maven-gpg-plugin`
- `maven-javadoc-plugin`
- `maven-source-plugin`

Your pom.xml file also needs the following sonatype plugin to automatically close and release your project from nexus.

- `nexus-staging-maven-plugin`

Also, in order to work with this project, your pom.xml file must include a comment next to the version entry. This is so that this tool can make appropriate changes.

See [this example project for a sample pom.xml](https://github.com/evansiroky/maven-semantic-release-example/blob/master/pom.xml).
```
<version>2.0.1-SNAPSHOT</version> <!-- semantic-release-version-line -->
```

<span style="font-size:larger;">[See this example project for a sample pom.xml](https://github.com/evansiroky/maven-semantic-release-example/blob/master/pom.xml).</span>

### Step 3: Create a maven-settings.xml file

Expand Down Expand Up @@ -84,3 +96,9 @@ cache:
- $HOME/.m2/repository
- $HOME/.yarn-cache
```

### Step 6: Add a github token to Travis

Create a Github token that will be used to make commits and create releases. Add the token to your travis environment variables as either `GH_TOKEN` or `GITHUB_TOKEN`. Add the following permissions to your token:

![Github token permissions](github-token-example.png)
Binary file added github-token-example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a8a0448

Please sign in to comment.