Skip to content

Commit

Permalink
added release changes from main
Browse files Browse the repository at this point in the history
Signed-off-by: Nischal Sharma <[email protected]>
  • Loading branch information
NickSneo committed Apr 15, 2024
1 parent 20992de commit 1a7ff22
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Build

on:
push:
branches: [ master ]
branches: [ main ]
pull_request:
branches: [ master ]
branches: [ main ]
workflow_dispatch:

jobs:
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ name: Publish snapshot
on:
workflow_run:
workflows: [ 'Build' ]
branches: [ master ]
branches: [ main ]
types: [ completed ]

jobs:
publish-snapshot:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_USERNAME: ${{ secrets.OSSRH_WEB3J_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
Expand All @@ -29,8 +30,6 @@ jobs:
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Decrypt secret key
run: openssl aes-256-cbc -K ${{ secrets.GPG_KEY }} -iv ${{ secrets.GPG_IV }} -in web3j.asc.enc -out web3j.asc -d
- name: Publish snapshot
run: ./gradlew publish

7 changes: 3 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ jobs:
release:
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_USERNAME: ${{ secrets.OSSRH_WEB3J_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
Expand All @@ -36,8 +37,6 @@ jobs:
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Decrypt secret key
run: openssl aes-256-cbc -K ${{ secrets.GPG_KEY }} -iv ${{ secrets.GPG_IV }} -in web3j.asc.enc -out web3j.asc -d
- name: Release name
id: release_name
uses: actions/github-script@v4
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ description 'Web3j base project.'
'spotless'
].each { buildScript ->
download {
src "https://raw.githubusercontent.com/web3j/build-tools/master/gradle/$buildScript/build.gradle"
src "https://raw.githubusercontent.com/hyperledger/web3j-build-tools/main/gradle/$buildScript/build.gradle"
dest "$rootDir/gradle/$buildScript/build.gradle"
overwrite false
quiet true
Expand Down
15 changes: 7 additions & 8 deletions gradle/publish/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ publishing {
slug = project.rootProjectOverride
}

url = "https://github.com/web3j/$slug"
connection = "scm:https://github.com/web3j/${slug}.git"
developerConnection = "scm:git://github.com/web3j/${slug}.git"
url = "https://github.com/hyperledger/$slug"
connection = "scm:https://github.com/hyperledger/${slug}.git"
developerConnection = "scm:git://github.com/hyperledger/${slug}.git"
}

developers {
Expand Down Expand Up @@ -84,8 +84,7 @@ nexusStaging {

signing {
sign publishing.publications.maven
def signingKey = new File("$rootDir/web3j.asc")
if (signingKey.exists()) {
useInMemoryPgpKeys(signingKey.getText('UTF-8'), System.getenv('GPG_PASSPHRASE'))
}
}
def gpgSecretKey = System.getenv('OSSRH_GPG_SECRET_KEY')
def password = System.getenv('OSSRH_GPG_SECRET_KEY_PASSWORD')
useInMemoryPgpKeys(gpgSecretKey, password)
}

0 comments on commit 1a7ff22

Please sign in to comment.