Skip to content

Commit

Permalink
feat: adds workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotBraem committed Nov 9, 2023
1 parent df5015d commit 78fbb62
Show file tree
Hide file tree
Showing 9 changed files with 132 additions and 151 deletions.
38 changes: 38 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
35 changes: 35 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Components to Mainnet
on:
push:
branches: [main]
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy widgets to social.near (mainnet)
env:
BOS_DEPLOY_ACCOUNT_ID: ${{ vars.BOS_DEPLOY_ACCOUNT_ID }}
BOS_SIGNER_ACCOUNT_ID: ${{ vars.BOS_SIGNER_ACCOUNT_ID }}
BOS_SIGNER_PUBLIC_KEY: ${{ vars.BOS_SIGNER_PUBLIC_KEY }}
BOS_SIGNER_PRIVATE_KEY: ${{ secrets.BOS_SIGNER_PRIVATE_KEY }}
NETWORK_ID: mainnet

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

- name: Install near-social CLI
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.1/bos-cli-v0.3.1-installer.sh | sh
- name: Install bos-workspace from dev branch
run: |
npm install https://github.com/NEARBuilders/bos-workspace.git#dev
- name: Build the workspaces
run: |
npm run bosworkspace build
- name: Deploy widgets
working-directory: ./build/homepage
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
35 changes: 35 additions & 0 deletions .github/workflows/testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy Components to Testnet
on:
push:
branches: [feature/testnet-deploy]
jobs:
deploy-widgets:
runs-on: ubuntu-latest
name: Deploy widgets to social.near (testnet)
env:
BOS_DEPLOY_ACCOUNT_ID: ${{ vars.TESTNET_DEPLOY_ACCOUNT_ID }}
BOS_SIGNER_ACCOUNT_ID: ${{ vars.TESTNET_SIGNER_ACCOUNT_ID }}
BOS_SIGNER_PUBLIC_KEY: ${{ vars.TESTNET_SIGNER_PUBLIC_KEY }}
BOS_SIGNER_PRIVATE_KEY: ${{ secrets.TESTNET_SIGNER_PRIVATE_KEY }}
NETWORK_ID: testnet

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

- name: Install near-social CLI
run: |
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/FroVolod/bos-cli-rs/releases/download/v0.3.1/bos-cli-v0.3.1-installer.sh | sh
- name: Install bos-workspace from dev branch
run: |
npm install https://github.com/NEARBuilders/bos-workspace.git#dev
- name: Build the workspaces
run: |
npm run bosworkspace build
- name: Deploy widgets
working-directory: ./build/canvas
run: |
bos components deploy "$BOS_DEPLOY_ACCOUNT_ID" sign-as "$BOS_SIGNER_ACCOUNT_ID" network-config testnet sign-with-plaintext-private-key --signer-public-key "$BOS_SIGNER_PUBLIC_KEY" --signer-private-key "$BOS_SIGNER_PRIVATE_KEY" send
2 changes: 1 addition & 1 deletion apps/homepage/bos.config.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"appAccount": "builddao.near"
"appAccount": "buildhub.near"
}
2 changes: 1 addition & 1 deletion apps/homepage/widget/WidgetMetadataEditor.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ if (metadata === null) {
return (
<Widget
key={widgetPath}
src="builddao.near/widget/MetadataEditor"
src="/*__@appAccount__*//widget/builddao.MetadataEditor"
props={{
initialMetadata: metadata,
onChange,
Expand Down
147 changes: 0 additions & 147 deletions apps/homepage/widget/community/join.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion apps/homepage/widget/home.jsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const ownerId = "builddao.near";
const ownerId = "/*__@appAccount__*/";

const Root = styled.div`
background-color: #0b0c14;
Expand Down
2 changes: 1 addition & 1 deletion apps/homepage/widget/propose.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ return (
</span>
</>
) : (
<Widget src="builddao.near/widget/propose-widget" />
<Widget src="/*__@appAccount__*//widget/propose-widget" />
)}
</Card>
</Container>
Expand Down

0 comments on commit 78fbb62

Please sign in to comment.