Skip to content

Commit e123a94

Browse files
committed
Merge branch 'master' into develop
2 parents 1d0da8f + 250d05d commit e123a94

File tree

3 files changed

+73
-4
lines changed

3 files changed

+73
-4
lines changed

.github/workflows/gradle.yml

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# This workflow will build a Java project with Gradle
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
3+
4+
name: Java CI with Gradle
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Set up JDK 1.8
20+
uses: actions/setup-java@v1
21+
with:
22+
java-version: 1.8
23+
- name: Grant execute permission for gradlew
24+
run: chmod +x gradlew
25+
- name: Build with Gradle
26+
run: ./gradlew build

.github/workflows/gradlepublish.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will build a package using Gradle and then publish it to GitHub packages when a release is created
2+
# For more information see: https://github.com/actions/setup-java#publishing-using-gradle
3+
4+
name: Gradle Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Set up JDK 1.8
18+
uses: actions/setup-java@v1
19+
with:
20+
java-version: 1.8
21+
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
22+
settings-path: ${{ github.workspace }} # location for the settings.xml file
23+
24+
- name: Build with Gradle
25+
run: gradle build
26+
27+
# The USERNAME and TOKEN need to correspond to the credentials environment variables used in
28+
# the publishing section of your build.gradle
29+
- name: Publish to GitHub Packages
30+
run: gradle publish
31+
env:
32+
USERNAME: ${{ github.actor }}
33+
TOKEN: ${{ secrets.GITHUB_TOKEN }}

build.gradle

+14-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,22 @@ sourceCompatibility = 1.7
1919
targetCompatibility = 1.7
2020

2121
publishing {
22+
repositories {
23+
maven {
24+
name = "GitHubPackages"
25+
url = uri("https://maven.pkg.github.com/dmi3coder/behaiv-java")
26+
credentials {
27+
username = project.findProperty("gpr.user") ?: System.getenv("USERNAME")
28+
password = project.findProperty("gpr.key") ?: System.getenv("TOKEN")
29+
}
30+
}
31+
}
2232
publications {
23-
maven(MavenPublication) {
24-
groupId = 'de.dmi3y.behaiv'
25-
artifactId = 'behaiv'
33+
gpr(MavenPublication) {
34+
groupId = 'tech.donau.behaiv'
35+
artifactId = 'behaiv-java'
2636
version = '0.4.8-alpha'
27-
from components.java
37+
from(components.java)
2838
}
2939
}
3040
}

0 commit comments

Comments
 (0)