Skip to content

Commit f2104d5

Browse files
Merge pull request #13 from onix-labs/feature-github-actions-build
Create gradle-build.yml
2 parents 5ed937d + 288a3df commit f2104d5

File tree

5 files changed

+41
-8
lines changed

5 files changed

+41
-8
lines changed

.github/workflows/gradle-build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
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:
9+
- '**'
10+
pull_request:
11+
branches:
12+
- '**'
13+
14+
jobs:
15+
build:
16+
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Set up JDK 8
22+
uses: actions/setup-java@v2
23+
with:
24+
java-version: '8'
25+
distribution: 'adopt'
26+
cache: gradle
27+
- name: Grant execute permission for gradlew
28+
run: chmod +x gradlew
29+
- name: Build with Gradle
30+
env:
31+
GHA_USERNAME: ${{ secrets.GHA_USERNAME }}
32+
GHA_TOKEN: ${{ secrets.GHA_TOKEN }}
33+
run: ./gradlew build

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ subprojects {
5858
name = "GitHubPackages-onixlabs-corda-core"
5959
url = uri("https://maven.pkg.github.com/onix-labs/onixlabs-corda-core")
6060
credentials {
61-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
62-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
61+
username = project.findProperty("gpr.user") ?: System.getenv("GHA_USERNAME")
62+
password = project.findProperty("gpr.key") ?: System.getenv("GHA_TOKEN")
6363
}
6464
}
6565
}

onixlabs-corda-identity-framework-contract/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ publishing {
4343
name = "GitHubPackages"
4444
url = uri("https://maven.pkg.github.com/onix-labs/onixlabs-corda-identity-framework")
4545
credentials {
46-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
47-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
46+
username = project.findProperty("gpr.user") ?: System.getenv("GHA_USERNAME")
47+
password = project.findProperty("gpr.key") ?: System.getenv("GHA_TOKEN")
4848
}
4949
}
5050
}

onixlabs-corda-identity-framework-integration/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ publishing {
2323
name = "GitHubPackages"
2424
url = uri("https://maven.pkg.github.com/onix-labs/onixlabs-corda-identity-framework")
2525
credentials {
26-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
27-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
26+
username = project.findProperty("gpr.user") ?: System.getenv("GHA_USERNAME")
27+
password = project.findProperty("gpr.key") ?: System.getenv("GHA_TOKEN")
2828
}
2929
}
3030
}

onixlabs-corda-identity-framework-workflow/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ publishing {
4343
name = "GitHubPackages"
4444
url = uri("https://maven.pkg.github.com/onix-labs/onixlabs-corda-identity-framework")
4545
credentials {
46-
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
47-
password = project.findProperty("gpr.key") ?: System.getenv("GITHUB_TOKEN")
46+
username = project.findProperty("gpr.user") ?: System.getenv("GHA_USERNAME")
47+
password = project.findProperty("gpr.key") ?: System.getenv("GHA_TOKEN")
4848
}
4949
}
5050
}

0 commit comments

Comments
 (0)