Skip to content

Commit

Permalink
Merge pull request #3 from rndquu/development
Browse files Browse the repository at this point in the history
test
  • Loading branch information
rndquu authored May 20, 2024
2 parents d78d5b1 + 9c52767 commit b6a4f00
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 18 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/bump-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Bump Version

on:
workflow_dispatch:
inputs:
bump:
description: 'bump type: major, minor or patch'
default: ''

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository code
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
registry-url: https://registry.npmjs.org/

- name: Bump version
run: |
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
yarn version --new-version ${{ github.event.inputs.bump }}
43 changes: 26 additions & 17 deletions .github/workflows/publish-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,37 @@ name: publish-package

on:
workflow_dispatch:
push:
branches:
- main
inputs:
newversion:
description: 'Semantic Version Bump Type (major minor patch)'
required: true

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: node
package-name: "@test117/rpc-handler"
default-branch: main
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- name: Checkout repository code
uses: actions/checkout@v4

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
registry-url: https://registry.npmjs.org/
- run: |
yarn install --immutable --immutable-cache --check-cache
yarn build
yarn pack
yarn publish --access public
env:
NPM_ACCESS_TOKEN: ${{ secrets.NPM_ACCESS_TOKEN }}

# - name: Build
# run: |
# yarn install --immutable --immutable-cache --check-cache
# yarn build
# yarn pack

- name: Version and publish to npm
id: npm-bump
uses: bcomnes/npm-bump@v2
with:
git_email: [email protected]
git_username: github-actions
newversion: ${{ github.event.inputs.newversion }}
push_version_commit: true
github_token: ${{ secrets.GITHUB_TOKEN }}
npm_token: ${{ secrets.NPM_ACCESS_TOKEN }}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"open-source"
],
"dependencies": {
"@ethersproject/providers": "5.7.2"
"@ethersproject/providers": "5.7.2",
"node-fetch": "^3.3.2"
},
"devDependencies": {
"@babel/core": "^7.24.0",
Expand Down
52 changes: 52 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3417,6 +3417,7 @@ __metadata:
jest-junit: "npm:16.0.0"
knip: "npm:^5.0.1"
lint-staged: "npm:^15.2.2"
node-fetch: "npm:^3.3.2"
npm-run-all: "npm:^4.1.5"
prettier: "npm:^3.2.5"
ts-jest: "npm:^29.1.2"
Expand Down Expand Up @@ -4905,6 +4906,13 @@ __metadata:
languageName: node
linkType: hard

"data-uri-to-buffer@npm:^4.0.0":
version: 4.0.1
resolution: "data-uri-to-buffer@npm:4.0.1"
checksum: 10c0/20a6b93107597530d71d4cb285acee17f66bcdfc03fd81040921a81252f19db27588d87fc8fc69e1950c55cfb0bf8ae40d0e5e21d907230813eb5d5a7f9eb45b
languageName: node
linkType: hard

"debug@npm:4, debug@npm:4.3.4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.1, debug@npm:^4.3.2, debug@npm:^4.3.4":
version: 4.3.4
resolution: "debug@npm:4.3.4"
Expand Down Expand Up @@ -5757,6 +5765,16 @@ __metadata:
languageName: node
linkType: hard

"fetch-blob@npm:^3.1.2, fetch-blob@npm:^3.1.4":
version: 3.2.0
resolution: "fetch-blob@npm:3.2.0"
dependencies:
node-domexception: "npm:^1.0.0"
web-streams-polyfill: "npm:^3.0.3"
checksum: 10c0/60054bf47bfa10fb0ba6cb7742acec2f37c1f56344f79a70bb8b1c48d77675927c720ff3191fa546410a0442c998d27ab05e9144c32d530d8a52fbe68f843b69
languageName: node
linkType: hard

"file-entry-cache@npm:^6.0.1":
version: 6.0.1
resolution: "file-entry-cache@npm:6.0.1"
Expand Down Expand Up @@ -5884,6 +5902,15 @@ __metadata:
languageName: node
linkType: hard

"formdata-polyfill@npm:^4.0.10":
version: 4.0.10
resolution: "formdata-polyfill@npm:4.0.10"
dependencies:
fetch-blob: "npm:^3.1.2"
checksum: 10c0/5392ec484f9ce0d5e0d52fb5a78e7486637d516179b0eb84d81389d7eccf9ca2f663079da56f761355c0a65792810e3b345dc24db9a8bbbcf24ef3c8c88570c6
languageName: node
linkType: hard

"fs-extra@npm:10.1.0":
version: 10.1.0
resolution: "fs-extra@npm:10.1.0"
Expand Down Expand Up @@ -8199,6 +8226,13 @@ __metadata:
languageName: node
linkType: hard

"node-domexception@npm:^1.0.0":
version: 1.0.0
resolution: "node-domexception@npm:1.0.0"
checksum: 10c0/5e5d63cda29856402df9472335af4bb13875e1927ad3be861dc5ebde38917aecbf9ae337923777af52a48c426b70148815e890a5d72760f1b4d758cc671b1a2b
languageName: node
linkType: hard

"node-fetch@npm:3.0.0-beta.9":
version: 3.0.0-beta.9
resolution: "node-fetch@npm:3.0.0-beta.9"
Expand All @@ -8209,6 +8243,17 @@ __metadata:
languageName: node
linkType: hard

"node-fetch@npm:^3.3.2":
version: 3.3.2
resolution: "node-fetch@npm:3.3.2"
dependencies:
data-uri-to-buffer: "npm:^4.0.0"
fetch-blob: "npm:^3.1.4"
formdata-polyfill: "npm:^4.0.10"
checksum: 10c0/f3d5e56190562221398c9f5750198b34cf6113aa304e34ee97c94fd300ec578b25b2c2906edba922050fce983338fde0d5d34fcb0fc3336ade5bd0e429ad7538
languageName: node
linkType: hard

"node-gyp@npm:latest":
version: 10.1.0
resolution: "node-gyp@npm:10.1.0"
Expand Down Expand Up @@ -10324,6 +10369,13 @@ __metadata:
languageName: node
linkType: hard

"web-streams-polyfill@npm:^3.0.3":
version: 3.3.3
resolution: "web-streams-polyfill@npm:3.3.3"
checksum: 10c0/64e855c47f6c8330b5436147db1c75cb7e7474d924166800e8e2aab5eb6c76aac4981a84261dd2982b3e754490900b99791c80ae1407a9fa0dcff74f82ea3a7f
languageName: node
linkType: hard

"which-boxed-primitive@npm:^1.0.2":
version: 1.0.2
resolution: "which-boxed-primitive@npm:1.0.2"
Expand Down

0 comments on commit b6a4f00

Please sign in to comment.