Skip to content

Release 4.12.3

Release 4.12.3 #85

Workflow file for this run

name: Release
on:
push:
branches: [ 'release/**' ]
jobs:
release:
runs-on: ubuntu-latest
env:
OSSRH_USERNAME: ${{ secrets.OSSRH_WEB3J_USERNAME }}
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
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@v4
- name: Build Workflow Dispatch
uses: convictional/[email protected]
with:
owner: hyperledger-web3j
repo: web3j
github_token: ${{ secrets.GITHUB_TOKEN }}
workflow_file_name: build.yml
wait_interval: 10
propagate_failure: true
trigger_workflow: true
wait_workflow: true
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Release name
id: release_name
uses: actions/github-script@v4
with:
result-encoding: string
script: |
const branch_name = process.env.GITHUB_REF
const web3j_release_version = branch_name.substring(branch_name.lastIndexOf('/') +1 ,branch_name.length )
process.env.VERSION = web3j_release_version
return web3j_release_version
- name: Build and stage release
run: ./gradlew publish -Pversion=${{ steps.release_name.outputs.result }}
- name: Release
run: ./gradlew closeAndReleaseRepository
outputs:
stripped_version: ${{ steps.release_name.outputs.result }}
git-release:
needs: release
runs-on: ubuntu-latest
steps:
- name: Github Release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: 'v${{ needs.release.outputs.stripped_version }}'
prerelease: false
files: |
"web3j-"+${{ steps.release_name.outputs.result }}.*
javadocs-release:
runs-on: ubuntu-latest
steps:
- name: Javadoc release
run: ./gradlew -Dorg.ajoberstar.grgit.auth.username=${{ secrets.GITHUB_TOKEN }} core:gitPublishPush