Skip to content

Commit

Permalink
Merge pull request #64 from nats-io/improve-builds
Browse files Browse the repository at this point in the history
improve builds
  • Loading branch information
scottf authored Jan 23, 2024
2 parents 907f0b7 + 8fdfcfc commit ae3e9ff
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 13 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/build-main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: GitHub Merge Or Release Build Actions For Vert.x NATS client

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
env:
BUILD_EVENT: ${{ github.event_name }}
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
steps:
- name: Setup JDK 8
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
- name: Install Nats Server
run: |
curl -sf https://binaries.nats.dev/nats-io/nats-server/v2@main | PREFIX=. sh
sudo mv nats-server /usr/local/bin
nats-server -v
- name: Check out code
uses: actions/checkout@v3
- name: Build and Test
run: chmod +x gradlew && ./gradlew clean test
- name: Verify Javadoc
run: ./gradlew javadoc
- name: Publish Snapshot
run: ./gradlew -i publishToSonatype
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: GitHub Merge Or Release Build Actions For Vert.x NATS client

on:
push:
branches:
- main
release:
branches:
- main
Expand Down Expand Up @@ -34,11 +31,6 @@ jobs:
uses: actions/checkout@v3
- name: Build and Test
run: chmod +x gradlew && ./gradlew clean test
- name: Verify Javadoc
run: ./gradlew javadoc
- name: On Merge to Main, Verify and Publish Snapshot
if: ${{ success() && github.event_name == 'push' }}
run: ./gradlew -i publishToSonatype
- name: On Tag Release Main, Verify, Sign and Publish Release
- name: Verify, Sign and Publish Release
if: ${{ success() && github.event_name == 'release' }}
run: ./gradlew -i signArchives signMavenJavaPublication publishToSonatype closeAndReleaseSonatypeStagingRepository
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ This component provides a NATS client for reading and sending messages from/to a
The nats-java-vertx-client is a Java client library for connecting to the NATS messaging system. It is built on top of
the Vert.x event-driven framework and provides an asynchronous, non-blocking API for sending and receiving messages over NATS.

**Current Release**: 2.0.1   **Current Snapshot**: 2.0.2-SNAPSHOT

[![License Apache 2](https://img.shields.io/badge/License-Apache2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0)
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/io.nats/nats-vertx-interface/badge.svg)](https://maven-badges.herokuapp.com/maven-central/io.nats/nats-vertx-interface)
[![javadoc](https://javadoc.io/badge2/io.nats/nats-vertx-interface/javadoc.svg)](https://javadoc.io/doc/io.nats/nats-vertx-interface)
[![Coverage Status](https://coveralls.io/repos/github/nats-io/nats-java-vertx-client/badge.svg?branch=main)](https://coveralls.io/github/nats-io/nats-java-vertx-client?branch=main)
[![Build Main Badge](https://github.com/nats-io/nats-java-vertx-client/actions/workflows/build-main.yml/badge.svg?event=push)](https://github.com/nats-io/nats-java-vertx-client/actions/workflows/build-main.yml)
[![Release Badge](https://github.com/nats-io/nats-java-vertx-client/actions/workflows/build-release.yml/badge.svg?event=release)](https://github.com/nats-io/nats.java/actions/workflows/build-release.yml)

## Using the Vert.x NATS client

To use this component, add the following dependency to the dependencies section of your build descriptor:
Expand Down
8 changes: 4 additions & 4 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {

}

def jarVersion = "2.0.1"
def jarVersion = "2.0.2"
group = 'io.nats'

def isMerge = System.getenv("BUILD_EVENT") == "push"
Expand All @@ -33,10 +33,10 @@ repositories {

dependencies {

implementation 'io.nats:jnats:2.17.1'
implementation 'io.nats:jnats:2.17.2'
implementation("com.fasterxml.jackson.core:jackson-core:2.14.2")
implementation("io.netty:netty-handler:4.1.97.Final")
implementation(platform("io.vertx:vertx-stack-depchain:4.4.0"))
implementation(platform("io.vertx:vertx-stack-depchain:4.5.1"))
implementation("io.vertx:vertx-core")
implementation("io.netty:netty-resolver-dns-native-macos:4.1.80.Final:osx-x86_64")
testImplementation("io.vertx:vertx-junit5")
Expand Down Expand Up @@ -116,7 +116,7 @@ publishing {
packaging = 'jar'
groupId = group
artifactId = archivesBaseName
description = 'Java NATS.io server runner.'
description = 'Java NATS.io Vert.x thin client wrapper.'
url = 'https://github.com/nats-io/java-nats-server-runner'
licenses {
license {
Expand Down

0 comments on commit ae3e9ff

Please sign in to comment.