Skip to content

Commit 14c6e56

Browse files
committed
Fixes for JAR publishing
Signed-off-by: Matthew B White <[email protected]>
1 parent 5cfd5d7 commit 14c6e56

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,16 @@
55
name: Fabric Chaincode and Smart Contract - Java
66
on:
77
push:
8-
branches: ["**"]
8+
branches:
9+
- main
10+
- release-2.5
911
pull_request:
10-
branches: ["**"]
11-
workflow_dispatch:
12+
branches:
13+
- main
14+
- release-2.5
15+
create:
16+
tags:
17+
- "*"
1218

1319
jobs:
1420

@@ -121,12 +127,12 @@ jobs:
121127
uses: gradle/wrapper-validation-action@e6e38bacfdf1a337459f332974bb2327a31aaf4b
122128
- name: Push to registry
123129
run: |
124-
echo $KEYRING_FILE > keyringfile.gpg
125-
./gradlew -Psigning.keyId=${SIGNING_ID} -Psigning.password=${SIGNING_PASSWORD} -Psigning.secretKeyRingFile=keyringfile.gpg -PossrhUsername=${OSSRH_USER} -PossrhPassword=${OSSRH_PASSWORD} publishAllPublicationsToReleaseRepository
126-
env:
127-
SIGNING_ID: ossrh
130+
set -xev
131+
132+
./gradlew -Psigning.key=${SIGNING_KEY} -Psigning.password=${SIGNING_PASSWORD} -PossrhUsername=${OSSRH_USER} -PossrhPassword=${OSSRH_PASSWORD} publishAllPublicationsToReleaseRepository
133+
env:
128134
SIGNING_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
129-
KEYRING_FILE: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
135+
SIGNING_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
130136
OSSRH_USER: ${{ secrets.OSSRH_USERNAME }}
131137
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}}
132138

@@ -152,6 +158,8 @@ jobs:
152158
wget -qO "$PWD/manifest-tool" https://github.com/estesp/manifest-tool/releases/download/v1.0.0/manifest-tool-linux-amd64
153159
chmod +x ./manifest-tool
154160
161+
# just debuging
162+
echo ${{ needs.setup.outputs.PACKAGE_VERSION }}
155163
echo "Version strings are ${PACKAGE_VERSION} ${MINOR_PACKAGE_VERSION}"
156164
157165
docker image load --input build/fabric-javaenv.tar.gz

fabric-chaincode-shim/build.gradle

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
mavenCentral()
99
}
1010
dependencies {
11-
classpath 'org.owasp:dependency-check-gradle:7.1.0.1'
11+
classpath 'org.owasp:dependency-check-gradle:7.4.3'
1212
}
1313
}
1414

@@ -41,7 +41,7 @@ tasks.withType(org.gradle.api.tasks.testing.Test) {
4141
}
4242

4343
dependencies {
44-
implementation group: 'org.hyperledger.fabric', name:'fabric-protos', version:'0.1.3'
44+
implementation group: 'org.hyperledger.fabric', name:'fabric-protos', version:'0.2.0'
4545
implementation 'org.bouncycastle:bcpkix-jdk15on:1.62'
4646
implementation 'org.bouncycastle:bcprov-jdk15on:1.62'
4747
implementation group: 'io.github.classgraph', name: 'classgraph', version: '4.8.146'
@@ -341,7 +341,11 @@ publishing {
341341
}
342342

343343
signing {
344-
if (project.findProperty('signing.keyId')) {
344+
if (project.findProperty('signing.key')) {
345+
def signingKey = findProperty("signing.key")
346+
def signingPassword = findProperty("signing.password")
347+
useInMemoryPgpKeys(signingKey, signingPassword)
348+
345349
sign publishing.publications.shim
346350
sign publishing.publications.shimJar
347351
}

0 commit comments

Comments
 (0)