Skip to content

Commit

Permalink
Merge pull request #46 from smeup/nexus-deploy-action
Browse files Browse the repository at this point in the history
Nexus deploy action
  • Loading branch information
mattiabonardi committed Dec 12, 2022
2 parents 241f31a + 85a4ade commit 2320ede
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 16 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/smeup.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy to nexus
on:
push:
branches: [master, develop]
env:
DISTRIBUTION: zulu
JAVA_VERSION: 8

jobs:
deploy-jardis-server:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Set smeup nexus settings for snapshots
if: ${{ github.ref == 'refs/heads/develop' }}
uses: actions/setup-java@v3
with:
distribution: ${{ env.DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
server-id: snapshots
cache: 'maven'
server-username: NEXUS_USER
server-password: NEXUS_PASSWORD

- name: Set smeup nexus settings for releases
if: ${{ github.ref == 'refs/heads/master' }}
uses: actions/setup-java@v3
with:
distribution: ${{ env.DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
server-id: releases
cache: 'maven'
server-username: NEXUS_USER
server-password: NEXUS_PASSWORD

- name: Publish to smeup nexus
run: mvn deploy -DskipTests
env:
NEXUS_USER: ${{ secrets.NEXUS_USER }}
NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}


2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ bin/
*.iml
/docker/mongodb/data/
/base/src/test/resources/dds/properties/out/
.gradle/
.vscode
36 changes: 27 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,38 @@ We use [Maven Central](https://repo1.maven.org/maven2/.) to publish the [project
See more details [here](docs/central.md).

### Maven
If you use Maven, add the following dependencies for the core library:

<dependency>
<groupId>com.github.smeup.reload</groupId>
<artifactId>reload</artifactId>
<version>development-SNAPSHOT</version>
</dependency>
If you use Maven and if you want to work with sql and no-sql, add the following dependencies:

<dependency>
<groupId>io.github.smeup.reload</groupId>
<artifactId>base</artifactId>
<version>vx.y.z</version>
</dependency>
<dependency>
<groupId>io.github.smeup.reload</groupId>
<artifactId>manager</artifactId>
<version>vx.y.z</version>
</dependency>
<dependency>
<groupId>io.github.smeup.reload</groupId>
<artifactId>sql</artifactId>
<version>vx.y.z</version>
</dependency>
<dependency>
<groupId>io.github.smeup.reload</groupId>
<artifactId>nosql</artifactId>
<version>vx.y.z</version>
</dependency>

### Gradle
Here are the configurationd to add to your build.gradle:
The gradle configuration could be like this:
```
dependencies {
...
implementation 'com.github.smeup:reload:-SNAPSHOT'
implementation "io.github.smeup.reload:base:vx.y.z"
implementation "io.github.smeup.reload:manager:vx.y.z"
implementation "io.github.smeup.reload:sql:vx.y.z"
implementation "io.github.smeup.reload:nosql:vx.y.z"
}
```

Expand Down
25 changes: 19 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,16 @@
<profiles>
<profile>
<id>ci-cd</id>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
</distributionManagement>
<build>
<plugins>
<plugin>
Expand Down Expand Up @@ -222,14 +232,17 @@
</profiles>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
<repository>
<id>ossrh</id>
<url>https://s01.oss.sonatype.org/service/local/staging/deploy/maven2</url>
<id>releases</id>
<name>Internal Releases</name>
<url>https://repo.smeup.cloud/nexus/content/repositories/releases</url>
</repository>

<snapshotRepository>
<id>snapshots</id>
<name>Internal Snapshots</name>
<url>https://repo.smeup.cloud/nexus/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

</project>

0 comments on commit 2320ede

Please sign in to comment.