This repository has been archived by the owner on Oct 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
breaking: Initial implementation. (#1)
Note: # Initial implementation Initial configs without too many bugs, documentation lacking. Will be added later (I promise 😇).
- Loading branch information
Showing
151 changed files
with
19,737 additions
and
1 deletion.
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,12 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
|
||
[**.{js,jsx,ts,tsx,css,json,md}] | ||
indent_style = spaces | ||
indent_size = 2 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = 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,15 @@ | ||
.next/ | ||
coverage/ | ||
node_modules/ | ||
public/ | ||
esm/ | ||
lib/ | ||
!src/lib | ||
tmp/ | ||
dist/ | ||
build/ | ||
jest.config.js | ||
babel.config.js | ||
webpack.config.js | ||
build*/ | ||
\.eslintrc.js |
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,7 @@ | ||
module.exports = { | ||
root: true, | ||
extends: ['rajzik', 'rajzik/node', 'rajzik/typescript', 'rajzik/future', 'rajzik/prettier'], | ||
env: { | ||
node: 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,2 @@ | ||
# Ignore all differences in line endings | ||
* -crlf |
Validating CODEOWNERS rules …
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 @@ | ||
* @rajzik |
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,11 @@ | ||
name: detect-env | ||
description: Sets node and yarn version from nvmrc and yvmrc files. | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Determine Node Version | ||
run: echo NODE_VERSION=$(cat .nvmrc | tr -d '\n') >> $GITHUB_ENV | ||
shell: bash | ||
- name: Determine Yarn Version | ||
run: echo YARN_VERSION=$(cat .yvmrc | tr -d '\n') >> $GITHUB_ENV | ||
shell: bash |
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,59 @@ | ||
{ | ||
"$schema": "https://docs.renovatebot.com/renovate-schema.json", | ||
"extends": [ | ||
"config:base", | ||
":semanticCommitScopeDisabled" | ||
], | ||
"semanticCommitType": "deps", | ||
"prCreation": "immediate", | ||
"github-actions": { | ||
"fileMatch": [ | ||
"^(workflow-templates|\\.github\\/workflows)\\/[^/]+\\.ya?ml$", | ||
"(^|\\/)action\\.ya?ml$" | ||
], | ||
"semanticCommitType": "ci" | ||
}, | ||
"npm": { | ||
"enabled": true, | ||
"semanticCommitType": "build" | ||
}, | ||
"semanticCommits": "enabled", | ||
"updateLockFiles": true, | ||
"commitMessageSuffix": ".", | ||
"packageRules": [ | ||
{ | ||
"matchDepTypes": [ | ||
"peerDependencies" | ||
], | ||
"rangeStrategy": "widen", | ||
"semanticCommitType": "deps" | ||
}, | ||
{ | ||
"matchDepTypes": [ | ||
"packageManager" | ||
], | ||
"semanticCommitType": "build" | ||
}, | ||
{ | ||
"matchDepTypes": [ | ||
"devDependencies" | ||
], | ||
"rangeStrategy": "bump", | ||
"semanticCommitType": "build" | ||
}, | ||
{ | ||
"matchDepTypes": [ | ||
"dependencies" | ||
], | ||
"rangeStrategy": "bump", | ||
"semanticCommitType": "deps" | ||
}, | ||
{ | ||
"matchDepTypes": [ | ||
"resolutions" | ||
], | ||
"rangeStrategy": "bump", | ||
"semanticCommitType": "build" | ||
} | ||
] | ||
} |
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,191 @@ | ||
name: Continuous Integration | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
env: | ||
CI: 1 | ||
ARTIFACT_DIR: ./artifacts | ||
|
||
jobs: | ||
commit-watch: | ||
name: Run Commit Watch | ||
runs-on: ubuntu-latest | ||
if: | ||
"github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip | ||
ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/detect-env | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
|
||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install --immutable | ||
- name: Build | ||
run: yarn build | ||
|
||
- run: rm babel.config.js | ||
|
||
- run: npx danger ci --use-github-checks | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: commit-watch-artifacts | ||
path: ${{ env.ARTIFACT_DIR }} | ||
|
||
tests: | ||
name: Lint & Tests | ||
runs-on: ubuntu-latest | ||
if: "!contains(github.event.head_commit.message, '[skip ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/detect-env | ||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
|
||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: | | ||
yarn install --immutable | ||
- name: Build | ||
run: yarn build | ||
|
||
- name: Tests | ||
run: yarn test | ||
|
||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: coverage-unit-tests | ||
path: ./raw-coverage/jest | ||
|
||
publish_preview: | ||
name: Publish Preview | ||
runs-on: ubuntu-latest | ||
needs: [tests] | ||
if: | ||
"github.event_name == 'pull_request' && !contains(github.event.head_commit.message, '[skip | ||
ci]')" | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: ./.github/actions/detect-env | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
|
||
- name: Create artifacts directory | ||
run: mkdir -p ${{ env.ARTIFACT_DIR }} | ||
|
||
- name: Restore yarn cache | ||
id: yarn-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
./.yarn | ||
.pnp.* | ||
key: ${{ env.NODE_VERSION }}-${{ env.YARN_VERSION }}-${{ hashFiles('yarn.lock') }} | ||
|
||
- name: Install dependencies | ||
run: yarn install --immutable | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Fix entry points | ||
run: yarn prepack | ||
|
||
- name: Run Monodeploy in Dry Run Mode | ||
id: run-monodeploy | ||
run: | | ||
echo "<!-- MONODEPLOY:BELOW -->" > ${{ env.ARTIFACT_DIR }}/CHANGELOG.md | ||
yarn monodeploy \ | ||
--dry-run \ | ||
--log-level 0 \ | ||
--git-base-branch origin/${{ github.base_ref }} \ | ||
--changelog-filename ${{ env.ARTIFACT_DIR }}/CHANGELOG.md \ | ||
--force-write-change-files | ||
changelog_body=$(cat ${{ env.ARTIFACT_DIR }}/CHANGELOG.md) | ||
changelog_body="${changelog_body//'%'/'%25'}" | ||
changelog_body="${changelog_body//$'\n'/'%0A'}" | ||
changelog_body="${changelog_body//$'\r'/'%0D'}" | ||
echo ::set-output name=changelog::$changelog_body | ||
- name: Check for Changelog Comment | ||
uses: peter-evans/find-comment@v1 | ||
id: found-comment | ||
if: github.event_name == 'pull_request' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
comment-author: 'rajzik-bot' | ||
body-includes: <!-- CHANGELOG_PREVIEW --> | ||
|
||
- name: Post Changelog to PR | ||
uses: peter-evans/create-or-update-comment@v1 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
comment-id: ${{ steps.found-comment.outputs.comment-id }} | ||
issue-number: ${{ github.event.pull_request.number }} | ||
edit-mode: replace | ||
body: | | ||
<!-- CHANGELOG_PREVIEW --> | ||
# Monodeploy Publish Preview | ||
This Pull Request introduces the following changes: | ||
${{ steps.run-monodeploy.outputs.changelog }} | ||
- name: Upload Artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: build-artifacts | ||
path: ${{ env.ARTIFACT_DIR }} |
Oops, something went wrong.