diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..f0c0bc3 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,23 @@ +version: 2 +updates: + - package-ecosystem: 'github-actions' + directory: '/' + schedule: + day: 'tuesday' + interval: 'monthly' + time: '02:00' + timezone: 'Europe/Berlin' + - package-ecosystem: 'npm' + directory: '/' + schedule: + day: 'tuesday' + interval: 'monthly' + time: '02:00' + timezone: 'Europe/Berlin' + pull-request-branch-name: + separator: '-' + open-pull-requests-limit: 99 + target-branch: 'main' + commit-message: + prefix: 'chore' + include: 'scope' diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..b7bf2b2 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,14 @@ +'type: bug(fix) ๐Ÿž': + title: '^fix(\(.+\))?:.*' +'type: chore ๐Ÿงน': + title: '^chore(\(.+\))?:.*' +'type: docs ๐Ÿ“‹': + title: '^docs(\(.+\))?:.*' +'type: feature โœจ': + title: '^feat(\(.+\))?:.*' +'type: refactor ๐Ÿ”ง': + title: '^refactor(\(.+\))?:.*' +'type: style ๐ŸŽจ': + title: '^style(\(.+\))?:.*' +'type: test ๐Ÿงช': + title: '^test(\(.+\))?:.*' diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..d2db194 --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,22 @@ +# https://docs.github.com/en/repositories/releasing-projects-on-github/automatically-generated-release-notes#example-configuration +changelog: + exclude: + authors: + - 'dependabot' + categories: + - title: 'New' + labels: + - 'type: feature โœจ' + - title: 'Improved' + labels: + - 'type: docs ๐Ÿ“‹' + - 'type: style ๐ŸŽจ' + - title: 'Fixed' + labels: + - 'type: bug(fix) ๐Ÿž' + - title: 'Documentation' + labels: + - 'type: docs ๐Ÿ“‹' + - title: 'Other Changes' + labels: + - '*' diff --git a/.github/workflows/create-release.yml b/.github/workflows/create-release.yml new file mode 100644 index 0000000..2fb2561 --- /dev/null +++ b/.github/workflows/create-release.yml @@ -0,0 +1,15 @@ +name: 'Create Release' + +on: + push: + tags: + - 'v*.*.*' + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: 'Create Release' + uses: softprops/action-gh-release@v2 + with: + generate_release_notes: true diff --git a/.github/workflows/generate-labels.yml b/.github/workflows/generate-labels.yml new file mode 100644 index 0000000..5a2d061 --- /dev/null +++ b/.github/workflows/generate-labels.yml @@ -0,0 +1,14 @@ +name: 'Generate Labels' + +on: + pull_request: + types: [opened, edited, synchronize] + +jobs: + label: + name: 'Label PR based on title' + runs-on: ubuntu-latest + steps: + - uses: srvaroa/labeler@v1.4 + env: + GITHUB_TOKEN: ${{ github.token }} diff --git a/.github/workflows/merge-dependencies.yml b/.github/workflows/merge-dependencies.yml new file mode 100644 index 0000000..980899b --- /dev/null +++ b/.github/workflows/merge-dependencies.yml @@ -0,0 +1,26 @@ +name: 'Merge Dependencies' + +# https://github.blog/changelog/2021-02-19-github-actions-workflows-triggered-by-dependabot-prs-will-run-with-read-only-permissions/ +on: [pull_request_target] + +permissions: + pull-requests: write + contents: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} + steps: + # https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request#about-auto-merge + - name: 'Enable auto-merge on PR' + run: gh pr merge --auto --squash "$PR_URL" + env: + PR_URL: ${{ github.event.pull_request.html_url }} + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Approve PR' + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..7f668f5 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,17 @@ +name: CI + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test-coverage: + uses: bennycode/actions/.github/workflows/test-coverage-yarn.yml@main + secrets: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} diff --git a/packages/eslint-config/.eslintrc.json b/packages/eslint-config/.eslintrc.json index 8df749f..acd6743 100644 --- a/packages/eslint-config/.eslintrc.json +++ b/packages/eslint-config/.eslintrc.json @@ -46,6 +46,7 @@ "prefer-inline": true } ], + "max-depth": ["warn", 4], "no-cond-assign": "error", "no-console": "off", "no-const-assign": "error",