Skip to content

Commit

Permalink
Bundler Release optimization (#900)
Browse files Browse the repository at this point in the history
* resolve #889

* pr-commenter

* integration test

* package versions

(cherry picked from commit bf216bc)
  • Loading branch information
wsdt authored and InoMurko committed Jul 31, 2023
1 parent 5f5fe5c commit 93969a0
Show file tree
Hide file tree
Showing 56 changed files with 988 additions and 414 deletions.
48 changes: 46 additions & 2 deletions .github/workflows/aa-bundler-sdk-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,68 @@ jobs:
The package that is going to be updated is `@bobanetwork/bundler_sdk`.
- uses: MontyD/package-json-updated-action@1.0.1
id: version-updated-aa
with:
path: packages/boba/account-abstraction/package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: MontyD/package-json-updated-action@1.0.1
id: version-updated-utils
with:
path: packages/boba/bundler_utils/package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: MontyD/package-json-updated-action@1.0.1
id: version-updated
with:
path: packages/boba/bundler_sdk/package.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- id: get-latest-tag-aa
working-directory: ./packages/boba/account-abstraction
run: echo "aa_current_version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT

- id: get-latest-tag-utils
working-directory: ./packages/boba/bundler_utils
run: echo "utils_current_version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT

- id: get-latest-tag
working-directory: ./packages/boba/bundler_sdk
run: echo "sdk_current_version=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT

- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver-aa
with:
current_version: ${{ steps.get-latest-tag-aa.outputs.aa_current_version }}
level: patch

- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver-utils
with:
current_version: ${{ steps.get-latest-tag-utils.outputs.utils_current_version }}
level: patch

- uses: actions-ecosystem/action-bump-semver@v1
id: bump-semver
with:
current_version: ${{ steps.get-latest-tag.outputs.sdk_current_version }}
level: patch

- name: Increment patch version
- name: Increment patch version - AA
if: steps.version-updated-aa.outputs.has-updated == 'true'
working-directory: ./packages/boba/account-abstraction
run: yarn version patch --no-commit-hooks --no-git-tag-version --new-version ${{ steps.bump-semver-aa.outputs.new_version }}

- name: Increment patch version - BundlerUtils
if: steps.version-updated-utils.outputs.has-updated == 'true'
working-directory: ./packages/boba/bundler_utils
run: yarn version patch --no-commit-hooks --no-git-tag-version --new-version ${{ steps.bump-semver-utils.outputs.new_version }}

- name: Increment patch version - BundlerSDK
if: steps.version-updated.outputs.has-updated == 'true'
working-directory: ./packages/boba/bundler_sdk
run: yarn version patch --no-commit-hooks --no-git-tag-version --new-version ${{ steps.bump-semver.outputs.new_version }}
Expand All @@ -68,7 +112,7 @@ jobs:
with:
base: develop
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
commit-message: Update SDK version
commit-message: Update NPM versions
committer: GitHub <noreply@github.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/aa-bundler-sdk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,19 @@ jobs:
- name: Install dependencies and build 🔧
run: yarn install --frozen-lockfile --legacy-peer-deps && yarn run build

- name: Publish package on NPM 📦
- name: Publish AA package on NPM 📦
working-directory: ./packages/boba/account-abstraction
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOBA_FOUNDATION }}

- name: Publish BundlerUtils package on NPM 📦
working-directory: ./packages/boba/bundler_utils
run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOBA_FOUNDATION }}

- name: Publish BundlerSDK package on NPM 📦
working-directory: ./packages/boba/bundler_sdk
run: npm publish --access public
env:
Expand Down
Loading

0 comments on commit 93969a0

Please sign in to comment.