Skip to content

Commit

Permalink
chore: add web3uikit repo files
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhinavMV committed Jun 18, 2022
1 parent 9207383 commit a5080d0
Show file tree
Hide file tree
Showing 13 changed files with 974 additions and 34 deletions.
29 changes: 29 additions & 0 deletions ,github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: 'Pull request'
about: A new pull request
---

## New Pull Request

### Checklist

<!--
Check every following box [x] before submitting your PR.
Click the "Preview" tab for better readability.
Thanks for contributing to Moralis!
-->

- [ ] I am not disclosing a [vulnerability](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/SECURITY.md).
- [ ] My code is conform the [code style](https://github.com/web3ui/web3uikit/blob/master/CONTRIBUTE.md)
- [ ] I have made corresponding changes to the documentation
- [ ] I have updated Typescript definitions when needed

### Issue Description

<!-- Add a brief description of the issue this PR solves. -->

Related issue: #`FILL_THIS_OUT`

### Solution Description

<!-- Add a description of the solution in this PR. -->
20 changes: 20 additions & 0 deletions ,github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Workflow name
name: 'Build Chromatic'

# Event for the workflow
on: push

# List of jobs
jobs:
chromatic-deployment:
# Operating System
runs-on: ubuntu-latest
# Job steps
steps:
- uses: actions/checkout@v1
- name: Install dependencies
run: pnpm install
- name: Publish to Chromatic
uses: chromaui/action@v1
with:
projectToken: ${{ secrets.CHROMATIC_TOKEN }}
61 changes: 27 additions & 34 deletions ,github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,29 @@
name: release
name: CI
on: [push]
jobs:
build:
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}

on:
- workflow_dispatch
runs-on: ${{ matrix.os }}
strategy:
matrix:
node: ['14.x', '16.x']
os: [ubuntu-latest, windows-latest, macOS-latest]

jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Setup Git
run: |
git config user.name "GitHub Bot"
git config user.email "[email protected]"
- run: yarn install --frozen-lockfile --prefer-offline
- name: Version
shell: bash
run: yarn nx affected --base=last-release --target=version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Tag last-release
shell: bash
run: git tag -f last-release
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
force: true
tags: true
steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Install
run: pnpm install --network-timeout 1000000

- name: Test
run: pnpm test --ci --coverage --maxWorkers=2 --updateSnapshot

- name: Build
run: pnpm build
51 changes: 51 additions & 0 deletions ,github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: NPM publish

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

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

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Install
run: yarn install
# set up git since we will later push to the repo
- run: git config --global user.name "GitHub CD bot"
- run: git config --global user.email "[email protected]"
# upgrade npm version in package.json to the tag used in the release.
- run: npm version --force ${{ github.event.release.tag_name }}
# build the project
- run: npm run build
# run tests just in case
- run: npm test
- run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"

- name: publish to NPM as latest version
if: '!github.event.release.prerelease'
run: npm publish --tag latest
env:
# Use a token to publish to NPM. See below for how to set it up
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: publish to NPM beta version
if: 'github.event.release.prerelease'
run: npm publish --tag beta
env:
# Use a token to publish to NPM. See below for how to set it up
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

# push the version changes to GitHub
- run: git push origin HEAD:master
env:
# The secret is passed automatically. Nothing to configure.
github-token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 12 additions & 0 deletions ,github/workflows/size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: size
on: [pull_request]
jobs:
size:
runs-on: ubuntu-latest
env:
CI_JOB_NUMBER: 1
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions ,github/workflows/storybook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Updating the StoryBook Docs frontend
on:
push:
branches:
- master
jobs:
build:
name: Build, lint, test on ubuntu-latest and deploy

runs-on: ubuntu-latest

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

- name: Use Node ${{ matrix.node }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}

- name: Check REACT_APP_MORALIS_APP_ID
run: echo "REACT_APP_MORALIS_APP_ID=${{ secrets.REACT_APP_MORALIS_APP_ID }}"

- name: Check NPM_TOKEN
run: echo "MORALIS_APP_ID=${{ secrets.NPM_TOKEN }}"

- name: Install
run: pnpm install

- name: Install Github Pages
run: pnpm add -D gh-pages

- name: Test
run: pnpm test --ci --coverage --maxWorkers=2 --updateSnapshot

- name: Check MORALIS_APP_ID
run: echo "MORALIS_APP_ID=${{ secrets.MORALIS_APP_ID }}"

- name: Build Storybook
run: pnpm build-storybook
env:
STORYBOOK_MORALIS_APP_ID: ${{ secrets.STORYBOOK_MORALIS_APP_ID }}
STORYBOOK_MORALIS_SERVER_URL: ${{ secrets.STORYBOOK_MORALIS_SERVER_URL }}

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
1 change: 1 addition & 0 deletions .storybook/assets/Moralis-Web3-UI-kit.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 9 additions & 0 deletions .storybook/theme.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { create } from '@storybook/theming';
import logo from './assets/Moralis-Web3-UI-kit.svg';

export default create({
base: 'light',
brandTitle: 'Web3 Ui Kit',
brandUrl: 'https://github.com/web3ui/web3uikit',
brandImage: logo,
});
Loading

0 comments on commit a5080d0

Please sign in to comment.