Skip to content

Commit a5080d0

Browse files
committed
chore: add web3uikit repo files
1 parent 9207383 commit a5080d0

13 files changed

+974
-34
lines changed

,github/PULL_REQUEST_TEMPLATE.md

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: 'Pull request'
3+
about: A new pull request
4+
---
5+
6+
## New Pull Request
7+
8+
### Checklist
9+
10+
<!--
11+
Check every following box [x] before submitting your PR.
12+
Click the "Preview" tab for better readability.
13+
Thanks for contributing to Moralis!
14+
-->
15+
16+
- [ ] I am not disclosing a [vulnerability](https://github.com/MoralisWeb3/Moralis-JS-SDK/blob/main/SECURITY.md).
17+
- [ ] My code is conform the [code style](https://github.com/web3ui/web3uikit/blob/master/CONTRIBUTE.md)
18+
- [ ] I have made corresponding changes to the documentation
19+
- [ ] I have updated Typescript definitions when needed
20+
21+
### Issue Description
22+
23+
<!-- Add a brief description of the issue this PR solves. -->
24+
25+
Related issue: #`FILL_THIS_OUT`
26+
27+
### Solution Description
28+
29+
<!-- Add a description of the solution in this PR. -->

,github/workflows/chromatic.yml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Workflow name
2+
name: 'Build Chromatic'
3+
4+
# Event for the workflow
5+
on: push
6+
7+
# List of jobs
8+
jobs:
9+
chromatic-deployment:
10+
# Operating System
11+
runs-on: ubuntu-latest
12+
# Job steps
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Install dependencies
16+
run: pnpm install
17+
- name: Publish to Chromatic
18+
uses: chromaui/action@v1
19+
with:
20+
projectToken: ${{ secrets.CHROMATIC_TOKEN }}

,github/workflows/main.yml

+27-34
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,29 @@
1-
name: release
1+
name: CI
2+
on: [push]
3+
jobs:
4+
build:
5+
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
26

3-
on:
4-
- workflow_dispatch
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
node: ['14.x', '16.x']
11+
os: [ubuntu-latest, windows-latest, macOS-latest]
512

6-
jobs:
7-
release:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v3
11-
with:
12-
fetch-depth: 0
13-
- name: Use Node.js
14-
uses: actions/setup-node@v3
15-
with:
16-
node-version: '16'
17-
- name: Setup Git
18-
run: |
19-
git config user.name "GitHub Bot"
20-
git config user.email "[email protected]"
21-
- run: yarn install --frozen-lockfile --prefer-offline
22-
- name: Version
23-
shell: bash
24-
run: yarn nx affected --base=last-release --target=version
25-
env:
26-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
- name: Tag last-release
28-
shell: bash
29-
run: git tag -f last-release
30-
- name: Push changes
31-
uses: ad-m/github-push-action@master
32-
with:
33-
github_token: ${{ secrets.GITHUB_TOKEN }}
34-
branch: ${{ github.ref }}
35-
force: true
36-
tags: true
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v2
16+
17+
- name: Use Node ${{ matrix.node }}
18+
uses: actions/setup-node@v2
19+
with:
20+
node-version: ${{ matrix.node }}
21+
22+
- name: Install
23+
run: pnpm install --network-timeout 1000000
24+
25+
- name: Test
26+
run: pnpm test --ci --coverage --maxWorkers=2 --updateSnapshot
27+
28+
- name: Build
29+
run: pnpm build

,github/workflows/publish.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: NPM publish
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repo
13+
uses: actions/checkout@v2
14+
15+
- name: Use Node ${{ matrix.node }}
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: ${{ matrix.node }}
19+
20+
- name: Install
21+
run: yarn install
22+
# set up git since we will later push to the repo
23+
- run: git config --global user.name "GitHub CD bot"
24+
- run: git config --global user.email "[email protected]"
25+
# upgrade npm version in package.json to the tag used in the release.
26+
- run: npm version --force ${{ github.event.release.tag_name }}
27+
# build the project
28+
- run: npm run build
29+
# run tests just in case
30+
- run: npm test
31+
- run: npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}"
32+
33+
- name: publish to NPM as latest version
34+
if: '!github.event.release.prerelease'
35+
run: npm publish --tag latest
36+
env:
37+
# Use a token to publish to NPM. See below for how to set it up
38+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
39+
40+
- name: publish to NPM beta version
41+
if: 'github.event.release.prerelease'
42+
run: npm publish --tag beta
43+
env:
44+
# Use a token to publish to NPM. See below for how to set it up
45+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
46+
47+
# push the version changes to GitHub
48+
- run: git push origin HEAD:master
49+
env:
50+
# The secret is passed automatically. Nothing to configure.
51+
github-token: ${{ secrets.GITHUB_TOKEN }}

,github/workflows/size.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: size
2+
on: [pull_request]
3+
jobs:
4+
size:
5+
runs-on: ubuntu-latest
6+
env:
7+
CI_JOB_NUMBER: 1
8+
steps:
9+
- uses: actions/checkout@v1
10+
- uses: andresz1/size-limit-action@v1
11+
with:
12+
github_token: ${{ secrets.GITHUB_TOKEN }}

,github/workflows/storybook.yml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Updating the StoryBook Docs frontend
2+
on:
3+
push:
4+
branches:
5+
- master
6+
jobs:
7+
build:
8+
name: Build, lint, test on ubuntu-latest and deploy
9+
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repo
14+
uses: actions/checkout@v2
15+
16+
- name: Use Node ${{ matrix.node }}
17+
uses: actions/setup-node@v2
18+
with:
19+
node-version: ${{ matrix.node }}
20+
21+
- name: Check REACT_APP_MORALIS_APP_ID
22+
run: echo "REACT_APP_MORALIS_APP_ID=${{ secrets.REACT_APP_MORALIS_APP_ID }}"
23+
24+
- name: Check NPM_TOKEN
25+
run: echo "MORALIS_APP_ID=${{ secrets.NPM_TOKEN }}"
26+
27+
- name: Install
28+
run: pnpm install
29+
30+
- name: Install Github Pages
31+
run: pnpm add -D gh-pages
32+
33+
- name: Test
34+
run: pnpm test --ci --coverage --maxWorkers=2 --updateSnapshot
35+
36+
- name: Check MORALIS_APP_ID
37+
run: echo "MORALIS_APP_ID=${{ secrets.MORALIS_APP_ID }}"
38+
39+
- name: Build Storybook
40+
run: pnpm build-storybook
41+
env:
42+
STORYBOOK_MORALIS_APP_ID: ${{ secrets.STORYBOOK_MORALIS_APP_ID }}
43+
STORYBOOK_MORALIS_SERVER_URL: ${{ secrets.STORYBOOK_MORALIS_SERVER_URL }}
44+
45+
- name: Deploy
46+
uses: peaceiris/actions-gh-pages@v3
47+
with:
48+
github_token: ${{ secrets.GITHUB_TOKEN }}
49+
publish_dir: ./storybook-static
Loading

.storybook/theme.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { create } from '@storybook/theming';
2+
import logo from './assets/Moralis-Web3-UI-kit.svg';
3+
4+
export default create({
5+
base: 'light',
6+
brandTitle: 'Web3 Ui Kit',
7+
brandUrl: 'https://github.com/web3ui/web3uikit',
8+
brandImage: logo,
9+
});

0 commit comments

Comments
 (0)