From 1a7ff2245c135045895bc1315e56465249203a51 Mon Sep 17 00:00:00 2001 From: Nischal Sharma Date: Mon, 15 Apr 2024 15:20:32 +0530 Subject: [PATCH] added release changes from main Signed-off-by: Nischal Sharma --- .github/workflows/build.yml | 4 ++-- .github/workflows/publish-snapshot.yml | 9 ++++----- .github/workflows/release.yml | 7 +++---- build.gradle | 2 +- gradle/publish/build.gradle | 15 +++++++-------- 5 files changed, 17 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3d5e1a8ea..7ce0c5057 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Build on: push: - branches: [ master ] + branches: [ main ] pull_request: - branches: [ master ] + branches: [ main ] workflow_dispatch: jobs: diff --git a/.github/workflows/publish-snapshot.yml b/.github/workflows/publish-snapshot.yml index 01082da62..a1b1cb177 100644 --- a/.github/workflows/publish-snapshot.yml +++ b/.github/workflows/publish-snapshot.yml @@ -3,7 +3,7 @@ name: Publish snapshot on: workflow_run: workflows: [ 'Build' ] - branches: [ master ] + branches: [ main ] types: [ completed ] jobs: @@ -11,9 +11,10 @@ jobs: 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 @@ -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 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bdd655175..e997d886c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -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 diff --git a/build.gradle b/build.gradle index 451b8b473..2e6b3b7f7 100644 --- a/build.gradle +++ b/build.gradle @@ -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 diff --git a/gradle/publish/build.gradle b/gradle/publish/build.gradle index 9cc5f449d..6083f89e5 100644 --- a/gradle/publish/build.gradle +++ b/gradle/publish/build.gradle @@ -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 { @@ -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) +} \ No newline at end of file