Skip to content
This repository has been archived by the owner on Dec 14, 2020. It is now read-only.

Commit

Permalink
chore: introduce maven-semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
KengoTODA committed Feb 21, 2019
1 parent 77ee1f8 commit 6209e70
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 63 deletions.
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.travis/pubring.gpg
.travis/secring.gpg
.travis/settings.xml
.travis/secrets.tar
.travis/codesigning.asc

# Created by https://www.gitignore.io/api/maven,linux,eclipse,windows,intellij
# Edit at https://www.gitignore.io/?templates=maven,linux,eclipse,windows,intellij
Expand Down
35 changes: 10 additions & 25 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,18 @@ java:
cache:
directories:
- $HOME/.m2/repository
- $HOME/.yarn-cache
before_install:
- if [ -n "$encrypted_64235d4acdda_key" ]; then openssl aes-256-cbc -K $encrypted_64235d4acdda_key -iv $encrypted_64235d4acdda_iv -in .travis/secrets.tar.enc -out .travis/secrets.tar -d; fi
- if [ -f ".travis/secrets.tar" ]; then tar -xvf .travis/secrets.tar -C .travis; fi
- if [ -n "$encrypted_64235d4acdda_key" ]; then openssl aes-256-cbc -K $encrypted_64235d4acdda_key -iv $encrypted_64235d4acdda_iv -in .travis/codesigning.asc.enc -out .travis/codesigning.asc -d; fi
- if [ -f ".travis/codesigning.asc" ]; then gpg --fast-import .travis/codesigning.asc; fi
install: true
jobs:
include:
- stage: test
script: ./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B
- stage: deploy
name: "Deploy SNAPSHOT build"
script: skip
if: (branch = master) AND (type = push)
deploy:
provider: script
skip_cleanup: true
script: ./mvnw deploy -B -P release -s .travis/settings.xml -DskipTests -Dinvoker.skip
on:
branch: master
- script: skip
name: "Deploy stable build"
if: tag IS present
deploy:
provider: script
skip_cleanup: true
script: ./mvnw deploy -B -P release -s .travis/settings.xml -DskipTests -Dinvoker.skip
on:
tags: true
before_script:
- yarn global add @conveyal/maven-semantic-release semantic-release
script:
- ./mvnw org.jacoco:jacoco-maven-plugin:prepare-agent verify sonar:sonar -B
- ./mvnw clean -B # to build classes without jacoco agent for release
after_success:
- semantic-release --prepare @conveyal/maven-semantic-release --publish @semantic-release/github,@conveyal/maven-semantic-release --verify-conditions @semantic-release/github,@conveyal/maven-semantic-release --verify-release @conveyal/maven-semantic-release
addons:
sonarcloud:
organization: "worksapplications"
Expand Down
Binary file added .travis/codesigning.asc.enc
Binary file not shown.
Binary file removed .travis/secrets.tar.enc
Binary file not shown.
30 changes: 0 additions & 30 deletions .travis/settings.xml.template

This file was deleted.

22 changes: 22 additions & 0 deletions maven-settings.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<settings>
<servers>
<server>
<id>ossrh</id>
<username>${env.OSSRH_JIRA_USERNAME}</username>
<password>${env.OSSRH_JIRA_PASSWORD}</password>
</server>
</servers>
<profiles>
<profile>
<id>release</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<gpg.executable>gpg</gpg.executable>
<gpg.keyname>${env.GPG_KEY_NAME}</gpg.keyname>
<gpg.passphrase>${env.GPG_PASSPHRASE}</gpg.passphrase>
</properties>
</profile>
</profiles>
</settings>
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,6 @@
</profile>
<profile>
<id>release</id>
<properties>
<gpg.publicKeyring>${basedir}/.travis/pubring.gpg</gpg.publicKeyring>
<gpg.secretKeyring>${basedir}/.travis/secring.gpg</gpg.secretKeyring>
</properties>
<build>
<plugins>
<plugin>
Expand Down

0 comments on commit 6209e70

Please sign in to comment.