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

Commit

Permalink
support tsx deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
mpeterdev committed Nov 3, 2023
1 parent 82b8704 commit 9036aff
Showing 1 changed file with 36 additions and 8 deletions.
44 changes: 36 additions & 8 deletions .github/workflows/deploy-mainnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,39 @@ on:
branches: [main]
concurrency: main # do not allow parallel execution
jobs:
deploy-mainnet:
uses: bos-cli-rs/bos-cli-rs/.github/workflows/deploy-mainnet.yml@master
with:
deploy-account-address: bwe-demos.near
signer-account-address: bwe-demos.near
signer-public-key: ed25519:8WLckTAFUtT7SADeAw4BF7tUFfgeG5ZW5kFbfi1TQZQB
secrets:
SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
# We want to leverage the reusable workflow from bos cli as shown here, but
# we need to temporarily use a modified version of that in order to support
# tsx file deployment
#
# deploy-mainnet:
# uses: bos-cli-rs/bos-cli-rs/.github/workflows/deploy-mainnet.yml@master
# with:
# deploy-account-address: bwe-demos.near
# signer-account-address: bwe-demos.near
# signer-public-key: ed25519:8WLckTAFUtT7SADeAw4BF7tUFfgeG5ZW5kFbfi1TQZQB
# secrets:
# SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy widgets to social.near (mainnet)
env:
BOS_DEPLOY_ACCOUNT_ID: bwe-demos.near
BOS_SIGNER_ACCOUNT_ID: bwe-demos.near
BOS_SIGNER_PUBLIC_KEY: ed25519:8WLckTAFUtT7SADeAw4BF7tUFfgeG5ZW5kFbfi1TQZQB
BOS_SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }}

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Change all .tsx files to .jsx files
run: |
find . -name "*.tsx" -exec sh -c 'mv "$1" "${1%.tsx}.jsx"' _ {} \;
- name: Install near-social CLI
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.6/bos-cli-v0.3.6-installer.sh | sh
- name: Deploy widgets
run: |
bos components deploy "$BOS_DEPLOY_ACCOUNT_ID" sign-as "$BOS_SIGNER_ACCOUNT_ID" network-config mainnet sign-with-plaintext-private-key --signer-public-key "$BOS_SIGNER_PUBLIC_KEY" --signer-private-key "$BOS_SIGNER_PRIVATE_KEY" send

0 comments on commit 9036aff

Please sign in to comment.