Skip to content
This repository has been archived by the owner on Jul 23, 2024. It is now read-only.

SDK publish on release #6

SDK publish on release

SDK publish on release #6

Workflow file for this run

name: SDK publish on release
on:
workflow_run:
workflows: ["testing"]
branches: [main]
types:
- completed
jobs:
build:
permissions: write-all
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Setup Python
uses: actions/setup-python@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: generate code and namespace
shell: bash
run: |
cd web3rpc/codegen && gradle wrapper && gradle wrapper clean :deployJar && cd - &&\
cd web3rpc/rpc-specs && npm install && bash -x generate-namespace.sh && cd -
- name: generate python sdk
shell: bash
run: |
cd web3py-ext &&\
python -m pip install build wheel twine &&\
ls -ls &&\
python setup.py bdist_wheel &&\
cd -
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true
with:
password: ${{ secrets.PYPI_API_TOKEN }}
packages-dir: web3py-ext/dist
- name: generate java sdk
shell: bash
run: |
cd web3rpc/sdk/client/java && bash -x java-generate.sh && cd -
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
- name: Publish web3rpc-java package
uses: gradle/gradle-build-action@v2
with:
arguments: publish
build-root-directory: web3rpc/sdk/client/java/openapi
gradle-version: release-candidate
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
- name: Publish web3j-ext
uses: gradle/gradle-build-action@v2
with:
arguments: publish
build-root-directory: web3j-ext/web3j-ext
gradle-version: release-candidate
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGPASSWORD: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGPASSWORD }}
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}
- name: generate ethers-ext sdk
shell: bash
run: |
cd ethers-ext && npm install && npm run build && cd -
- name: publish ethers-ext sdk
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd ethers-ext && npx pnpm --filter "@klaytn/*" -r publish --publish-branch main --no-git-check --access=public && cd -
- name: generate web3rpc javascript sdk
shell: bash
run: |
cd web3rpc/sdk/client/javascript && bash -x javascript-generate.sh && cd -
- name: publish web3rpc javascript sdk
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
cd web3rpc/sdk/client/javascript/openapi && npx pnpm --filter "@klaytn/*" -r publish --publish-branch main --no-git-check --access=public && cd -