Skip to content

Commit

Permalink
Update travis and pom.xml for releases
Browse files Browse the repository at this point in the history
  • Loading branch information
jodastephen committed Mar 23, 2017
1 parent e97d3a2 commit 9bda820
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 37 deletions.
20 changes: 3 additions & 17 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,9 @@ install:
- mvn --version
script:
- mvn install -e -B
# deploy
before_deploy:
- travis_wait 40 mvn site-deploy -e -B --settings .github/maven-settings.xml
- export DIST_FILE1=$(ls target/joda-time-*-dist.tar.gz)
- export DIST_FILE2=$(ls target/joda-time-*-dist.zip)
deploy:
provider: releases
api_key:
secure: S9aAxkk3ICWqC24GDZK+L6n/xK9OWh4KRWiiSJ4wN4gVoshxLWOvB6aDLMTlQwd5FffzG7RT9aqeYBOihWZWupW4/0xP00yW5WE7dKpURDB0AuOllo1Em1IBL2AlEmhepOss1tn/A/uSApe134Hg8qryOpffAYNWzgzVlYFEM+0=
file:
- "${DIST_FILE1}"
- "${DIST_FILE2}"
skip_cleanup: true
on:
jdk: "oraclejdk7"
tags: true
condition: "$TRAVIS_TAG =~ ^v.*$"
after_success:
- if [[ $TRAVIS_TAG =~ ^v.*$ ]] && [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_JDK_VERSION" == "oraclejdk8" ]; then travis_wait 40 mvn site-deploy -e -B --settings .github/maven-settings.xml; fi
# secure keys for GITHUB_TOKEN
env:
global:
secure: UK9A4eHPOP6XkYbST1kpv3gVEZTBqp79eCF0nqpXejbXihY58MNVZ0aGt8IM/ZThO/UoK+AxWjaSLljE2Neo4ehxvRHsRG0bIhAoCBUjP6f6vuMYTZlRNb9W+NM3RjXvrQGnCM3PTckWaFQ6i5Ny4e1GuETSdh96Yk7WNn6DMJM=
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,12 @@ Please use GitHub issues and Pull Requests for support.
### History
Issue tracking and active development is at GitHub.
Historically, the project was at [Sourceforge](https://sourceforge.net/projects/joda-time/).


### Release process

* Update version (pom.xml, README.md, index.md, MANIFEST.MF, changes.xml)
* Commit and push
* `mvn clean deploy -Doss.repo -Dgpg.passphrase=""`
* Release project in [Nexus](https://oss.sonatype.org)
* Website will be built and released by Travis
73 changes: 53 additions & 20 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -477,26 +477,6 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>false</attach>
<descriptors>
<descriptor>src/main/assembly/dist.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>deploy</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
Expand Down Expand Up @@ -816,6 +796,7 @@
</activation>
<build>
<plugins>
<!-- Use Java 5 -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-toolchains-plugin</artifactId>
Expand All @@ -836,6 +817,7 @@
</toolchains>
</configuration>
</plugin>
<!-- Sign artifacts -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
Expand All @@ -849,6 +831,57 @@
</execution>
</executions>
</plugin>
<!-- Create dist files -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<attach>false</attach>
<descriptors>
<descriptor>src/main/assembly/dist.xml</descriptor>
</descriptors>
<tarLongFileMode>gnu</tarLongFileMode>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Release dist files to GitHub -->
<plugin>
<groupId>de.jutzig</groupId>
<artifactId>github-release-plugin</artifactId>
<version>1.1.1</version>
<configuration>
<releaseName>Release v${project.version}</releaseName>
<description>See the [change notes](http://www.joda.org/joda-time/changes-report.html) for more information.</description>
<tag>v${project.version}</tag>
<overwriteArtifact>true</overwriteArtifact>
<fileSets>
<fileSet>
<directory>${project.build.directory}</directory>
<includes>
<include>${project.artifactId}*-dist.tar.gz</include>
<include>${project.artifactId}*-dist.zip</include>
</includes>
</fileSet>
</fileSets>
</configuration>
<executions>
<execution>
<id>github-releases</id>
<phase>deploy</phase>
<goals>
<goal>release</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<properties>
Expand Down

0 comments on commit 9bda820

Please sign in to comment.