Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added release for instances #902

Merged
merged 7 commits into from
Jul 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/release-instances.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
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:
- environment: events-committee.near
dry_run_command: npm run dry-run:events
deploy_command: npm run deploy:events
- 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 dependencies
run: |
npm ci
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"
echo "${{ matrix.target_account.environment }}"
echo "${{ matrix.target_account.deploy_command }} -- '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' sign-as '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' network-config mainnet sign-with-plaintext-private-key --signer-public-key '${{ vars.NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY }}' --signer-private-key '${{ secrets.NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY }}' send"
${{ matrix.target_account.dry_run_command }}
else
${{ matrix.target_account.deploy_command }} -- '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' sign-as '${{ vars.NEAR_SOCIAL_ACCOUNT_ID }}' network-config mainnet sign-with-plaintext-private-key --signer-public-key '${{ vars.NEAR_SOCIAL_ACCOUNT_PUBLIC_KEY }}' --signer-private-key '${{ secrets.NEAR_SOCIAL_ACCOUNT_PRIVATE_KEY }}' send
fi
Loading