Skip to content

Commit

Permalink
Update connect to 0.3.0 (#756)
Browse files Browse the repository at this point in the history

Co-authored-by: Artur Sapek <[email protected]>
  • Loading branch information
yuli-ferna and artursapek authored Mar 26, 2024
1 parent 41fea94 commit 62195c2
Show file tree
Hide file tree
Showing 8 changed files with 22,111 additions and 5,291 deletions.
77 changes: 36 additions & 41 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,23 +186,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: v18.17.1
- name: Checkout Wormhole Connect
uses: actions/checkout@v3
with:
repository: wormhole-foundation/wormhole-connect
ref: ${{inputs.connect-branch}}
path: wormhole-connect
- name: Build Wormhole Connect
id: wormhole-connect
run: |
npm install -g husky
pushd wormhole-connect
npm ci --workspaces --if-present
sed -i -e 's|vite build",|vite build --base=${{inputs.public-url}}/assets/wormhole-connect/",|g' wormhole-connect/package.json
npm run build
echo "_JS_SHA_384=$(shasum -b -a 384 wormhole-connect-loader/dist/main.js | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
echo "_CSS_SHA_384=$(shasum -b -a 384 wormhole-connect-loader/dist/main.css | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
npm link --workspaces --if-present
# - name: Checkout Wormhole Connect
# uses: actions/checkout@v3
# with:
# repository: wormhole-foundation/wormhole-connect
# ref: ${{inputs.connect-branch}}
# path: wormhole-connect
# - name: Build Wormhole Connect
# id: wormhole-connect
# run: |
# npm install -g husky
# pushd wormhole-connect
# npm ci --workspaces --if-present
# sed -i -e 's|vite build",|vite build --base=${{inputs.public-url}}/assets/wormhole-connect/",|g' wormhole-connect/package.json
# npm run build
# echo "_JS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.js | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
# echo "_CSS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.css | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
- name: Checkout Custom Wormhole Connect Loader
uses: actions/checkout@v3
with:
Expand All @@ -224,13 +223,12 @@ jobs:
PUBLIC_URL: ${{ inputs.public-url }}
VITE_APP_VERSION: ${{ steps.set-version.outputs._PKG_VERSION }}
VITE_APP_CLUSTER: ${{ vars.REACT_APP_CLUSTER }}
VITE_APP_JS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._JS_SHA_384 }}
VITE_APP_CSS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._CSS_SHA_384 }}
# VITE_APP_JS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._JS_SHA_384 }}
# VITE_APP_CSS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._CSS_SHA_384 }}
VITE_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID }}
run: |
pushd connect-loader/apps/connect
npm ci
npm link @wormhole-foundation/wormhole-connect
echo 'VITE_APP_VERSION=$npm_package_version' > .env
npm run build:usdc-bridge
- name: Upload Portal Bridge Artifact
Expand All @@ -253,23 +251,22 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: v18.17.1
- name: Checkout Wormhole Connect
uses: actions/checkout@v3
with:
repository: wormhole-foundation/wormhole-connect
ref: ${{inputs.connect-branch}}
path: wormhole-connect
- name: Build Wormhole Connect
id: wormhole-connect
run: |
npm install -g husky
pushd wormhole-connect
npm ci --workspaces --if-present
sed -i -e 's|vite build",|vite build --base=${{inputs.public-url}}/assets/wormhole-connect/",|g' wormhole-connect/package.json
npm run build
echo "_JS_SHA_384=$(shasum -b -a 384 wormhole-connect-loader/dist/main.js | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
echo "_CSS_SHA_384=$(shasum -b -a 384 wormhole-connect-loader/dist/main.css | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
npm link --workspaces --if-present
# - name: Checkout Wormhole Connect
# uses: actions/checkout@v3
# with:
# repository: wormhole-foundation/wormhole-connect
# ref: ${{inputs.connect-branch}}
# path: wormhole-connect
# - name: Build Wormhole Connect
# id: wormhole-connect
# run: |
# npm install -g husky
# pushd wormhole-connect
# npm ci --workspaces --if-present
# sed -i -e 's|vite build",|vite build --base=${{inputs.public-url}}/assets/wormhole-connect/",|g' wormhole-connect/package.json
# npm run build
# echo "_JS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.js | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
# echo "_CSS_SHA_384=$(shasum -b -a 384 wormhole-connect/dist/main.css | awk '{ print $1 }' | xxd -r -p | base64)" >> "${GITHUB_OUTPUT}"
- name: Checkout Custom Wormhole Connect Loader
uses: actions/checkout@v3
with:
Expand All @@ -290,13 +287,12 @@ jobs:
PUBLIC_URL: "${{ inputs.public-url }}"
VITE_APP_VERSION: ${{ steps.set-version.outputs._PKG_VERSION }}
VITE_APP_CLUSTER: ${{ vars.REACT_APP_CLUSTER }}
VITE_APP_JS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._JS_SHA_384 }}
VITE_APP_CSS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._CSS_SHA_384 }}
# VITE_APP_JS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._JS_SHA_384 }}
# VITE_APP_CSS_WC_INTEGRITY_SHA_384: ${{ steps.wormhole-connect.outputs._CSS_SHA_384 }}
VITE_APP_WALLET_CONNECT_PROJECT_ID: ${{ secrets.REACT_APP_WALLET_CONNECT_PROJECT_ID }}
run: |
pushd connect-loader/apps/connect
npm ci
npm link @wormhole-foundation/wormhole-connect
echo 'VITE_APP_VERSION=$npm_package_version' > .env
npm run build:token-bridge
- name: Upload Portal Bridge Artifact
Expand Down Expand Up @@ -358,7 +354,6 @@ jobs:
- name: Create Package.json
run: |
jq -n --arg version ${{ needs.token-bridge.outputs.pkg-version }} '{"name": "@xlabs/portal-bridge-ui", "version": $version }' > package.json
gzip -k -9 assets/wormhole-connect/main.js
- name: Upload Portal Bridge Artifact
uses: actions/upload-artifact@v3
with:
Expand Down
Loading

0 comments on commit 62195c2

Please sign in to comment.