Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
- run: mvn cobertura:cobertura
- run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-action/master/codecov) -t ${CODECOV_TOKEN}

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

workflows:
version: 2
Expand Down
48 changes: 48 additions & 0 deletions .github/workflows/version-and-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Release

on:
push:
tags:
- '*'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: get version from tag
id: get_version
run: |
realversion="${GITHUB_REF/refs\/tags\//}"
realversion="${realversion//v/}"
echo "::set-output name=VERSION::$realversion"

- name: set version from tag
uses: actions/setup-java@v2
run: mvn versions:set -DnewVersion=${{ steps.get_version.outputs.VERSION }}

- name: Set up publishing to maven central
uses: actions/setup-java@v2
with:
java-version: '8'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD

- name: Install gpg key
run: |
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG

- name: Publish
run: |
mvn --no-transfer-progress \
--batch-mode \
-Dgpg.passphrase="${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}" \
-s -DskipTests deploy -P release
env:
MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}}
MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.redislabs</groupId>
<artifactId>jrejson</artifactId>
<version>1.5.0-SNAPSHOT</version>

<name>JReJSON</name>
<description>Official client for ReJSON</description>
<url>https://oss.redislabs.com/rejson</url>
Expand Down Expand Up @@ -159,7 +159,13 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<version>3.0.1</version>
<configuration>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chayim format?

<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>loopback</arg>
</gpgArguments>
</configuration>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down