-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use env for release and refactor to one file
- Loading branch information
1 parent
2ab1c58
commit 2c47d58
Showing
5 changed files
with
50 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Deploy Components to Mainnet - Events and Infrastructure | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
deploy-widgets: | ||
name: Deploy (or diff from PR) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
target_account: | ||
events: | ||
environment: events-committee.near | ||
dry_run_command: npm run dry-run:events | ||
deploy_command: npm run deploy:events | ||
infrastructure: | ||
environment: infrastructure-committee.near | ||
dry_run_command: npm run dry-run:infrastructure | ||
deploy_command: npm run deploy:infrastructure | ||
environment: ${{ matrix.target_account.environment }} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install bos CLI | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.6/bos-cli-installer.sh | sh | ||
- name: Deploy widgets | ||
run: | | ||
BRANCH="$(git rev-parse --abbrev-ref HEAD)" | ||
echo "on branch $BRANCH" | ||
if [[ "$BRANCH" != "main" ]]; then | ||
echo "Not on main branch, dry run" | ||
${matrix.target_account.dry_run_command} | ||
else | ||
${matrix.target_account.deploy_command} -- '${{ secrets.NEAR_SOCIAL_ACCOUNT_ID }}' sign-as '${{ secrets.NEAR_SOCIAL_ACCOUNT_ID }}' network-config mainnet sign-with-plaintext-private-key --signer-public-key '${{ secrets.NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY }}' --signer-private-key '${{ secrets.NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY }}' send | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters