Skip to content

Commit

Permalink
Merge pull request #2034 from hyperledger/fix/revert-secrets
Browse files Browse the repository at this point in the history
revert secret changes
  • Loading branch information
gtebrean authored Apr 11, 2024
2 parents 9053082 + bd46cd9 commit 6cbdbb4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/publish-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@ jobs:
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
OSSRH_GPG_SECRET_KEY_PASSWORD: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
OSSRH_GPG_SECRET_KEY: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
Expand All @@ -30,6 +29,8 @@ 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

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
* Fix for test wrappers generation [#2025](https://github.com/web3j/web3j/pull/2025)
* Fix Snapshot release secrets [#2031](https://github.com/hyperledger/web3j/pull/2031)
* Fix Sign method [#2033](https://github.com/hyperledger/web3j/pull/2033)
* Revert 2031 and 2033 [#2034](https://github.com/hyperledger/web3j/pull/2034)

### Features

Expand Down
9 changes: 5 additions & 4 deletions gradle/publish/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,8 @@ nexusStaging {

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

0 comments on commit 6cbdbb4

Please sign in to comment.