generated from sapphiredev/sapphire-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit eafbd2c
Showing
38 changed files
with
8,920 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"projectName": "template", | ||
"projectOwner": "sapphiredev", | ||
"repoType": "github", | ||
"repoHost": "https://github.com", | ||
"files": ["README.md"], | ||
"imageSize": 100, | ||
"commit": true, | ||
"commitConvention": "angular", | ||
"contributors": [], | ||
"contributorsPerLine": 7, | ||
"skipCi": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.{js,ts}] | ||
indent_size = 4 | ||
indent_style = tab | ||
block_comment_start = /* | ||
block_comment = * | ||
block_comment_end = */ | ||
|
||
[*.{yml,yaml}] | ||
indent_size = 2 | ||
indent_style = space | ||
|
||
[*.{md,rmd,mkd,mkdn,mdwn,mdown,markdown,litcoffee}] | ||
tab_width = 4 | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules/ | ||
dist/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"extends": "@sapphire" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Favna is the primary maintainer of this repository | ||
* @favna |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
_ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn commitlint --edit $1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn pretty-quick --staged && yarn lint-staged |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "eslint-stylish", | ||
"pattern": [ | ||
{ | ||
"regexp": "^([^\\s].*)$", | ||
"file": 1 | ||
}, | ||
{ | ||
"regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$", | ||
"line": 1, | ||
"column": 2, | ||
"severity": 3, | ||
"message": 4, | ||
"code": 5, | ||
"loop": true | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"problemMatcher": [ | ||
{ | ||
"owner": "tsc", | ||
"pattern": [ | ||
{ | ||
"regexp": "^(?:\\s+\\d+\\>)?([^\\s].*)\\((\\d+|\\d+,\\d+|\\d+,\\d+,\\d+,\\d+)\\)\\s*:\\s+(error|warning|info)\\s+(\\w{1,2}\\d+)\\s*:\\s*(.*)$", | ||
"file": 1, | ||
"location": 2, | ||
"severity": 3, | ||
"code": 4, | ||
"message": 5 | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": ["github>sapphiredev/readme:sapphire-renovate"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: NPM Auto Deprecate | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
|
||
jobs: | ||
auto-deprecate: | ||
name: NPM Auto Deprecate | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Deprecate versions | ||
run: yarn npm-deprecate | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Code Scanning | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
schedule: | ||
- cron: '30 1 * * 0' | ||
|
||
jobs: | ||
CodeQL: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
|
||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2 | ||
|
||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2 | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@27ea8f8fe5977c00f5b37e076ab846c5bd783b96 # tag=v2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Continuous Delivery | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
prNumber: | ||
description: The number of the PR that is being deployed | ||
required: true | ||
ref: | ||
description: The branch that is being deployed. Should be a branch on the given repository | ||
required: false | ||
default: main | ||
repository: | ||
description: The {owner}/{repository} that is being deployed. | ||
required: false | ||
default: sapphiredev/sapphire-template | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
Publish: | ||
name: Publish Next to npm | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
with: | ||
fetch-depth: 0 | ||
repository: ${{ github.event.inputs.repository || 'sapphiredev/sapphire-template' }} | ||
ref: ${{ github.event.inputs.ref || 'main' }} | ||
- name: Add TypeScript problem matcher | ||
run: echo "::add-matcher::.github/problemMatchers/tsc.json" | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Bump Version & Publish | ||
run: | | ||
# Resolve the tag to be used. "next" for push events, "pr-{prNumber}" for dispatch events. | ||
TAG=$([[ ${{ github.event_name }} == 'push' ]] && echo 'next' || echo 'pr-${{ github.event.inputs.prNumber }}') | ||
# Bump the version | ||
yarn standard-version --skip.commit --skip.tag --prerelease "${TAG}.$(git rev-parse --verify --short HEAD)" | ||
# Publish to NPM | ||
npm publish --tag ${TAG} --dry-run || true | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
Linting: | ||
name: Linting | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Add problem matcher | ||
run: echo "::add-matcher::.github/problemMatchers/eslint.json" | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Run ESLint | ||
run: yarn lint --fix=false | ||
|
||
Testing: | ||
name: Unit Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Run tests | ||
run: yarn test --coverage | ||
- name: Store code coverage report | ||
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # tag=v3 | ||
with: | ||
name: coverage | ||
path: coverage/ | ||
|
||
Building: | ||
name: Compile source code | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Add problem matcher | ||
run: echo "::add-matcher::.github/problemMatchers/tsc.json" | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Build Code | ||
run: yarn build | ||
|
||
Upload_Coverage_Report: | ||
name: Upload coverage report to codecov | ||
needs: [Testing] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
with: | ||
fetch-depth: 2 | ||
- name: Download Coverage report | ||
uses: actions/download-artifact@fb598a63ae348fa914e94cd0ff38f362e927b741 # tag=v3 | ||
with: | ||
name: coverage | ||
path: coverage/ | ||
- name: Codecov Upload | ||
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378 # tag=v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
directory: coverage/ | ||
fail_ci_if_error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: NPM Deprecate PR versions On Merge | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
deprecate-on-merge: | ||
name: NPM Deprecate PR versions On Merge | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
- name: Use Node.js v16 | ||
uses: actions/setup-node@eeb10cff27034e7acf239c5d29f62154018672fd # tag=v3 | ||
with: | ||
node-version: 16 | ||
cache: yarn | ||
registry-url: https://registry.npmjs.org/ | ||
- name: Install Dependencies | ||
run: yarn --immutable | ||
- name: Deprecate versions | ||
run: yarn npm-deprecate --name "*pr-${PR_NUMBER}*" -d -v | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} | ||
PR_NUMBER: ${{ github.event.number }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: Automatic Label Sync | ||
|
||
on: | ||
schedule: | ||
- cron: '0 0 * * *' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
label_sync: | ||
name: Automatic Label Synchronization | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Project | ||
uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3 | ||
with: | ||
repository: 'sapphiredev/readme' | ||
- name: Run Label Sync | ||
uses: crazy-max/ghaction-github-labeler@77450f9fa47c41fbab15c0923417fff00730ffa3 # tag=v4 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
yaml-file: .github/labels.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: Release Crosspost | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
jobs: | ||
Crosspost: | ||
name: Release Crosspost | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Parse release name | ||
id: get_release_name | ||
run: echo ::set-output name=release_name::${RELEASE:-$TAG} | ||
env: | ||
RELEASE: ${{ github.event.release.name }} | ||
TAG: ${{ github.event.release.tag_name }} | ||
|
||
- name: Send Release Message | ||
id: crosspost_action | ||
uses: kludge-cs/gitcord-release-changelogger@5592170408dc081d7cb6a74ce025911bd1fcb7c3 # renovate: tag=v3.0.0 | ||
with: | ||
webhook-url: ${{ secrets.RELEASE_WEBHOOK }} | ||
release-body: ${{ github.event.release.body }} | ||
release-name: ${{ steps.get_release_name.outputs.release_name }} |
Oops, something went wrong.