From 27c68a5042ac5da7d8987b1b34d659531c62ba8f Mon Sep 17 00:00:00 2001 From: Elliot Braem <16282460+elliotBraem@users.noreply.github.com> Date: Wed, 8 Nov 2023 20:51:03 +0000 Subject: [PATCH] feat: adds git workflow --- .github/ISSUE_TEMPLATE/bug_report.md | 38 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 20 ++++++++++++ .github/workflows/release.yml | 35 +++++++++++++++++++++ .github/workflows/testnet.yml | 35 +++++++++++++++++++++ README.md | 3 +- 5 files changed, 130 insertions(+), 1 deletion(-) create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/testnet.yml diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..f3d5c415 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -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. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..11fc491e --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -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. diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..579ec9ce --- /dev/null +++ b/.github/workflows/release.yml @@ -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/canvas + 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 diff --git a/.github/workflows/testnet.yml b/.github/workflows/testnet.yml new file mode 100644 index 00000000..e39eacc5 --- /dev/null +++ b/.github/workflows/testnet.yml @@ -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 diff --git a/README.md b/README.md index 9ee802ad..78d2895e 100644 --- a/README.md +++ b/README.md @@ -17,4 +17,5 @@ yarn start ## TODO - [ ] Mobile Navigation Bar -- [ ] Desktop Navigation Bar \ No newline at end of file +- [ ] Desktop Navigation Bar +- [ ] Setup the deployment \ No newline at end of file