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

ci/cd merge into dev #514

Closed
wants to merge 31 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
eba6410
Merge pull request #456 from klaytn/dev
Jul 11, 2023
5b371d4
Merge pull request #483 from klaytn/dev
Aug 10, 2023
bf8ab8f
Merge pull request #486 from klaytn/dev
JayChoi1736 Aug 10, 2023
9c3ae16
Merge pull request #492 from klaytn/dev
Aug 14, 2023
319c330
testing split CICD pipeline
Sep 18, 2023
37f10df
Update cicd workflow
Sep 18, 2023
cebc9e3
Update cicd workflow
Sep 18, 2023
1926456
Update cicd workflow file
Sep 18, 2023
edbce8e
update workflow publish-ethers-ext.yml
Sep 18, 2023
47fb7bb
DevOps : Update workflow publish ether
Sep 18, 2023
493bce0
devops : update cicd file
Sep 18, 2023
d5508ac
test new cicd workflow
Sep 18, 2023
7b331e8
testing
Sotatek-TinnNguyen Sep 18, 2023
f40b13f
testing
Sotatek-TinnNguyen Sep 18, 2023
717c727
test new cicd workflow
Sep 18, 2023
6da6e5b
DevOps : Update cicd workflow - add on push trigger
Sep 18, 2023
d95381a
DevOps : Update new workflows - remove on push trigger option
Sep 18, 2023
9da36a8
DevOps : Update cicd workflows file - uncomment deploy step
Sep 18, 2023
d3b71ba
DevOps : Update CICD workflow - update check file changed and trigger…
Sep 19, 2023
ff190bf
DevOps : Update CICD workflows trigger logic
Sep 20, 2023
9c2b54e
update test workflows
Sep 20, 2023
4b09ef9
update test workflows
Sep 20, 2023
bf2871c
Edit name of testing wf
Sep 20, 2023
8a73589
Update test cicd
Sep 20, 2023
94f2c55
Testing - deploy ethers-ext
Sep 20, 2023
8ab0028
Testing - deploy web3j-ext
Sep 20, 2023
03f69d2
Testing - Deploy web3py-ext
Sep 20, 2023
51e5168
Testing - update web3rpc/rpc-specs folder
Sep 20, 2023
3066b50
Testing - deploy all
Sep 20, 2023
357ac2d
DevOps : Update CICD pipeline , add generate web3rpc-python step to p…
Sep 20, 2023
f654d0b
Merge pull request #511 from klaytn/devops/update-cicd-pipeline
Sotatek-TuLe2 Sep 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 120 additions & 0 deletions .github/workflows/publish-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
name: "SDK publish on release TEST"

on:
workflow_run:
workflows: ["testing-test"]
branches: [main]
types:
- completed
push:
branches: [devops/update-cicd-pipeline]

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: Verify Changed files
uses: tj-actions/changed-files@v39
id: verify-changed-files
with:
files_yaml: |
ethers-ext:
- "ethers-ext/package.json"
web3js-ext:
- "web3js-ext/package.json"
web3j-ext:
- "web3j-ext/web3j-ext/build.gradle"
web3py-ext:
- "web3py-ext/setup.py"
web3rpc:
- "web3rpc/rpc-specs/**"

- name: generate web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
cd web3py-ext &&\
python -m pip install build wheel twine &&\
ls -ls &&\
python setup.py bdist_wheel &&\
cd -

- name: Publish web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"

- name: Publish web3j-ext
if: steps.verify-changed-files.outputs.web3j-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"

- name: generate ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
shell: bash
run: |
cd ethers-ext && npm install && npm run build && cd -

- name: publish ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
shell: bash
run: |
echo "OK"


- name: generate web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
cd web3rpc/sdk/client/javascript && bash -x javascript-generate.sh && cd -

- name: publish web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
echo "OK"


- name: generate web3rpc-java sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
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 sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
echo "OK"
87 changes: 59 additions & 28 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: SDK publish on release
name: "SDK publish on release"

on:
workflow_run:
Expand Down Expand Up @@ -34,9 +34,32 @@ jobs:
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 -
cd web3rpc/rpc-specs && npm install && bash -x generate-namespace.sh && cd

- name: generate python sdk
- name: Verify Changed files
uses: tj-actions/changed-files@v39
id: verify-changed-files
with:
files_yaml: |
ethers-ext:
- "ethers-ext/package.json"
web3js-ext:
- "web3js-ext/package.json"
web3j-ext:
- "web3j-ext/web3j-ext/build.gradle"
web3py-ext:
- "web3py-ext/setup.py"
web3rpc:
- "web3rpc/rpc-specs/**"

- name: generate web3rpc-python
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
cd web3rpc/sdk/client/python && bash -x python-generate.sh && cd -

- name: generate web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
shell: bash
run: |
cd web3py-ext &&\
Expand All @@ -45,36 +68,16 @@ jobs:
python setup.py bdist_wheel &&\
cd -

- name: Publish distribution 📦 to PyPI
- name: Publish web3py-ext sdk
if: steps.verify-changed-files.outputs.web3py-ext_any_changed == 'true'
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
if: steps.verify-changed-files.outputs.web3j-ext_any_changed == 'true'
uses: gradle/gradle-build-action@v2
with:
arguments: publish
Expand All @@ -87,25 +90,53 @@ jobs:
ORG_GRADLE_PROJECT_SIGNINGKEY: ${{ secrets.ORG_GRADLE_PROJECT_SIGNINGKEY }}

- name: generate ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
shell: bash
run: |
cd ethers-ext && npm install && npm run build && cd -

- name: publish ethers-ext sdk
if: steps.verify-changed-files.outputs.ethers-ext_any_changed == 'true'
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

- name: generate web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
shell: bash
run: |
cd web3rpc/sdk/client/javascript && bash -x javascript-generate.sh && cd -

- name: publish web3rpc javascript sdk
- name: publish web3rpc-javascript sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
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 -


- name: generate web3rpc-java sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
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 sdk
if: steps.verify-changed-files.outputs.web3rpc_any_changed == 'true'
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 }}
111 changes: 111 additions & 0 deletions .github/workflows/publish.yml.bak
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
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 -


Empty file.