Skip to content

Commit 9bd25bc

Browse files
chayimgkorland
andauthored
release on tag (#42)
Co-authored-by: Guy Korland <gkorland@gmail.com>
1 parent 143d4bb commit 9bd25bc

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
- run: mvn cobertura:cobertura
4141
- run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-action/master/codecov) -t ${CODECOV_TOKEN}
4242

43-
- run: mvn -s .circleci.settings.xml -DskipTests deploy
43+
- run: mvn -s .circleci.settings.xml -DskipTests -Dgpg.skip deploy
4444

4545
workflows:
4646
version: 2
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: get version from tag
16+
id: get_version
17+
run: |
18+
realversion="${GITHUB_REF/refs\/tags\//}"
19+
realversion="${realversion//v/}"
20+
echo "::set-output name=VERSION::$realversion"
21+
22+
- name: set version from tag
23+
uses: actions/setup-java@v2
24+
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}
25+
26+
- name: Set up publishing to maven central
27+
uses: actions/setup-java@v2
28+
with:
29+
java-version: '8'
30+
distribution: 'adopt'
31+
server-id: ossrh
32+
server-username: MAVEN_USERNAME
33+
server-password: MAVEN_PASSWORD
34+
35+
- name: Install gpg key
36+
run: |
37+
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
38+
gpg --list-secret-keys --keyid-format LONG
39+
40+
- name: Publish
41+
run: |
42+
mvn --no-transfer-progress \
43+
--batch-mode \
44+
-Dgpg.passphrase="${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}" \
45+
-s -DskipTests deploy -P release
46+
env:
47+
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
48+
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}

pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<groupId>com.redislabs</groupId>
88
<artifactId>jrejson</artifactId>
99
<version>1.5.0-SNAPSHOT</version>
10-
10+
1111
<name>JReJSON</name>
1212
<description>Official client for ReJSON</description>
1313
<url>https://oss.redislabs.com/rejson</url>
@@ -159,7 +159,13 @@
159159
<plugin>
160160
<groupId>org.apache.maven.plugins</groupId>
161161
<artifactId>maven-gpg-plugin</artifactId>
162-
<version>1.5</version>
162+
<version>3.0.1</version>
163+
<configuration>
164+
<gpgArguments>
165+
<arg>--pinentry-mode</arg>
166+
<arg>loopback</arg>
167+
</gpgArguments>
168+
</configuration>
163169
<executions>
164170
<execution>
165171
<id>sign-artifacts</id>

0 commit comments

Comments
 (0)