Skip to content

Commit

Permalink
chore: scaffolding (#1)
Browse files Browse the repository at this point in the history
* chore: added docusaurus installation

* ci: add pull request template

* chore: add scaffolding

* ci: add pull request check workflow

* docs: add contributing guide

* ci: add release workflow

* feat: add @kieranroneill as an author and add some links to config

* docs: update readme to reflect repo

* ci: add deploy workflow
  • Loading branch information
kieranroneill authored Oct 19, 2023
1 parent 343ae91 commit 928cb4f
Show file tree
Hide file tree
Showing 58 changed files with 11,211 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.docusaurus/
build/
node_modules/
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: {
node: true,
},
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'prettier',
],
rules: {
'@typescript-eslint/no-inferrable-types': 'off',
'@typescript-eslint/no-namespace': ['error', { allowDeclarations: true }],
'prefer-const': 'off',
},
};
23 changes: 23 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!--
The title should summarise what the purpose of this change,
⚠️**NOTE:** The title must conform to the conventional commit message format outlined in CONTRIBUTING.md document, at the root of the project. This is to ensure the merge commit to the main branch is picked up by the CI and creates an entry in the CHANGELOG.md.
-->

# Description
<!-- Describe your changes in detail -->

# Type of change
<!-- What type of change does this change introduce? Put an 'x' in all the boxes that apply. -->

- [ ] 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] 🏗️ Build configuration (CI configuration, scaffolding etc.)
- [ ] 🐛 Bug fix (non-breaking change which fixes an issue)
- [ ] 📝 Documentation update(s)
- [ ] 📦 Dependency update(s)
- [ ] 👩🏽‍💻 Improve developer experience
- [ ] ⚡ Improve performance
- [ ] ✨ New feature (non-breaking change which adds functionality)
- [ ] ♻ Refactor
- [ ] ⏪ Revert changes
- [ ] 🧪 New tests or updates to existing tests
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy

on:
release:
types: [released] # triggered on main branch releases

jobs:
deploy:
name: "Deploy"
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v3
- name: "🔧 Setup"
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: "📦 Install"
run: yarn install --frozen-lockfile
- name: "🏗️ Build"
run: yarn build
- name: "🚀 Deploy"
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.WRITE_REPOS_TOKEN }}
publish_dir: ./build
user_name: agoralabs-bot
user_email: [email protected]
24 changes: 24 additions & 0 deletions .github/workflows/lint_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Pull Request Checks

on:
pull_request:

jobs:
lint_build_test:
name: "Lint, Build & Test"
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v3
- name: "🔧 Setup"
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
- name: "📦 Install"
run: yarn install --ignore-scripts
- name: "👕 Lint"
run: yarn lint
- name: "🏗️ Build"
run: yarn build
- name: "🧪 Test"
run: yarn test
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
push:
branches:
- main

jobs:
release:
name: "Release"
runs-on: ubuntu-latest
steps:
- name: "🛎 Checkout"
uses: actions/checkout@v3
- name: "🔧 Setup"
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
- name: "📦 Install"
run: yarn global add semantic-release @semantic-release/commit-analyzer @semantic-release/release-notes-generator @semantic-release/npm @semantic-release/github @semantic-release/git @semantic-release/changelog
- name: "🏗️ Build"
run: yarn build
- name: "🔖 Release"
env:
# appears on the release commits
GIT_AUTHOR_NAME: agoralabs-bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: agoralabs-bot
GIT_COMMITTER_EMAIL: [email protected]
# used to push the release commit and create the tags
GITHUB_TOKEN: ${{ secrets.WRITE_REPOS_TOKEN }}
run: semantic-release
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,11 @@ fabric.properties

### Miscellaneous

# docusaurus
.docusaurus
.cache-loader
/build

# dependencies
.npmrc
/.pnp
Expand Down
1 change: 1 addition & 0 deletions .husky/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn commitlint --edit "$1"
4 changes: 4 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged
6 changes: 6 additions & 0 deletions .huskyrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"hooks": {
"commit-msg": "commitlint -E HUSKY_GIT_PARAMS",
"pre-commit": "lint-staged"
}
}
4 changes: 4 additions & 0 deletions .lintstagedrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
'**/*.{js,json,ts,tsx}': (filenames) =>
`prettier --write ${filenames.join(' ')}`,
};
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.docusaurus/
build/
node_modules/
6 changes: 6 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"endOfLine": "lf",
"arrowParens": "always",
"singleQuote": true,
"trailingComma": "es5"
}
22 changes: 22 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"branches": ["main"],
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/changelog",
"@semantic-release/npm",
[
"@semantic-release/git",
{
"assets": ["package.json", "CHANGELOG.md"],
"message": "chore(release): ${nextRelease.version}\n\n${nextRelease.notes}"
}
],
[
"@semantic-release/github",
{
"releasedLabels": ["🚀 released"]
}
]
]
}
Loading

0 comments on commit 928cb4f

Please sign in to comment.