Skip to content

Commit

Permalink
feat: launch
Browse files Browse the repository at this point in the history
  • Loading branch information
DiogoAbu committed Sep 30, 2022
0 parents commit 78785e6
Show file tree
Hide file tree
Showing 27 changed files with 6,564 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extends": ["@commitlint/config-conventional"],
"rules": {
"header-max-length": [0],
"footer-max-line-length": [0]
}
}
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
tab_width = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
max_line_length = off
trim_trailing_whitespace = false
36 changes: 36 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.git/
.gitignore
.prettierignore
.eslintignore
.editorconfig
.browserslistrc
LICENSE

dist/
build/
coverage/
*.png
*.svg
*.xml
*.ico
*.patch

node_modules/
node_modules/**
**/node_modules/
**/node_modules/**

templates/
templates/**

generated/
generated/**

android/app/.cxx

!.vscode/
!.vscode/**
!.eslintrc.js
!.prettierrc.js
!.commitlintrc.js
!.releaserc.json
3 changes: 3 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["superop"]
}
86 changes: 86 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: Generate Release and Publish to NPM

on:
push:
branches:
- main
- beta

env:
node-version: 16
git-author-name: semantic-release-bot
git-author-email: [email protected]

jobs:
release:
name: Release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip ci]')"
steps:
- name: Increase watchers to fix Docker
run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

- name: Checkout the repo
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: ${{ env.node-version }}

- name: Get Yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"

- name: Cache Yarn dependencies
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 5
retry_on: error
command: yarn install --prefer-offline --frozen-lockfile --silent

- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v5
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
git_tag_gpgsign: true

- name: Start linter
run: |
yarn lint-fix
[[ `git status --porcelain` ]] || exit 0
git remote set-url origin "https://x-access-token:[email protected]/${{ github.repository }}.git"
git add .
git commit -m "style: lint fixes [skip ci]" --no-verify
git push -u origin ${{ github.ref }} --no-verify
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
GIT_AUTHOR_NAME: ${{ env.git-author-name }}
GIT_AUTHOR_EMAIL: ${{ env.git-author-email }}
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}

- name: Determine version, generate notes, commit and publish tag
run: npx semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PERSONAL_TOKEN }}
GIT_AUTHOR_NAME: ${{ env.git-author-name }}
GIT_AUTHOR_EMAIL: ${{ env.git-author-email }}
GIT_COMMITTER_NAME: ${{ steps.import-gpg.outputs.name }}
GIT_COMMITTER_EMAIL: ${{ steps.import-gpg.outputs.email }}
157 changes: 157 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,157 @@
# Created by https://www.toptal.com/developers/gitignore/api/node,yarn,vscode
# Edit at https://www.toptal.com/developers/gitignore?templates=node,yarn,vscode

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage
*.lcov

# nyc test coverage
.nyc_output

# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# TypeScript cache
*.tsbuildinfo

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional stylelint cache
.stylelintcache

# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env
.env.test
.env*.local

# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache

# Next.js build output
.next

# Nuxt.js build / generate output
.nuxt
dist

# Storybook build outputs
.out
.storybook-out
storybook-static

# rollup.js default build output
dist/

# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public

# vuepress build output
.vuepress/dist

# Serverless directories
.serverless/

# FuseBox cache
.fusebox/

# DynamoDB Local files
.dynamodb/

# TernJS port file
.tern-port

# Stores VSCode versions used for testing VSCode extensions
.vscode-test

# Temporary folders
tmp/
temp/

### vscode ###
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

### yarn ###
# https://yarnpkg.com/advanced/qa#which-files-should-be-gitignored

.yarn/*
!.yarn/releases
!.yarn/plugins
!.yarn/sdks
!.yarn/versions

# if you are NOT using Zero-installs, then:
# comment the following lines
!.yarn/cache

# and uncomment the following lines
# .pnp.*

# End of https://www.toptal.com/developers/gitignore/api/node,yarn,vscode

# We use yarn
package-*.json
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
5 changes: 5 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

yarn commitlint --edit $1
8 changes: 8 additions & 0 deletions .husky/common.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
command_exists () {
command -v "$1" >/dev/null 2>&1
}

# Workaround for Windows 10, Git Bash and Yarn
if command_exists winpty && test -t 1; then
exec < /dev/tty
fi
5 changes: 5 additions & 0 deletions .husky/post-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

git update-index --again
6 changes: 6 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

npx yarn-lock-fix
yarn lint-staged
5 changes: 5 additions & 0 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"
. "$(dirname "$0")/common.sh"

git fetch --prune origin "+refs/tags/*:refs/tags/*"
Empty file added .postinstall
Empty file.
36 changes: 36 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.git/
.gitignore
.prettierignore
.eslintignore
.editorconfig
.browserslistrc
LICENSE

dist/
build/
coverage/
*.png
*.svg
*.xml
*.ico
*.patch

node_modules/
node_modules/**
**/node_modules/
**/node_modules/**

templates/
templates/**

generated/
generated/**

android/app/.cxx

!.vscode/
!.vscode/**
!.eslintrc.js
!.prettierrc.js
!.commitlintrc.js
!.releaserc.json
1 change: 1 addition & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"eslint-config-superop/.prettierrc.js"
Loading

0 comments on commit 78785e6

Please sign in to comment.