Skip to content

Commit

Permalink
feat: refresh (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusrbrown authored Dec 31, 2023
1 parent 4124b3b commit 5ec6833
Show file tree
Hide file tree
Showing 27 changed files with 3,851 additions and 137,329 deletions.
7 changes: 2 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
* text=auto eol=lf
* text=auto

/.yarn/** linguist-vendored
/.yarn/releases/* binary
/.yarn/plugins/**/* binary
/.pnp.* binary linguist-generated
*.json text linguist-language=JSON-with-comments
16 changes: 13 additions & 3 deletions .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
{
$schema: 'https://docs.renovatebot.com/renovate-schema.json',
extends: ['github>bfra-me/renovate-config#v2.3.2', 'github>bfra-me/renovate-config:automerge/prForCI#v2.3.2'],
extends: ['github>bfra-me/renovate-config#v2.5.0'],
packageRules: [
{
matchPackageNames: ['@types/node', 'node', 'nodejs/node'],
allowedVersions: '< 17',
allowedVersions: '>=18',
},
{
matchPackageNames: ['npm'],
constraintsFiltering: 'strict',
},
],
postUpgradeTasks: {
commands: ['yarn install --immutable', 'yarn run build', 'yarn prettier --write .'],
commands: [
'npm install -g pnpm@8',
'pnpm install --frozen-lockfile --ignore-scripts',
'git checkout -- .npmrc',
'pnpm run build',
'pnpm run format',
],
executionMode: 'branch',
},
}
2 changes: 1 addition & 1 deletion .github/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ branches:
- name: main
protection:
required_status_checks:
strict: true
strict: false
contexts: ['Test', 'Release']
enforce_admins: true
required_pull_request_reviews: null
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/app.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,17 @@ name: GitHub App
- opened
jobs:
issuesOpened:
name: Issues opened
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: corepack enable
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
cache: yarn
cache: pnpm
node-version-file: package.json
- run: yarn install --immutable
- run: yarn build
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm build
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33 changes: 14 additions & 19 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: CI

'on':
push:
branches: [main]
branches: [main, 'renovate/**']
pull_request:
types: [opened, reopened, synchronize]

Expand All @@ -20,14 +20,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- run: corepack enable
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
cache: yarn
cache: pnpm
node-version-file: package.json
- run: yarn install --immutable
- run: pnpm install --frozen-lockfile --ignore-scripts
- name: Check formatting
run: yarn prettier --check .
- run: yarn test
run: pnpm check-format
- run: pnpm test

release:
env:
Expand All @@ -47,28 +48,22 @@ jobs:
with:
fetch-depth: 0
token: ${{ steps.get-workflow-access-token.outputs.token }}
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
cache: yarn
node-version-file: package.json
- run: corepack enable
- run: yarn install --immutable
- run: yarn build
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 'lts/*'
- run: corepack enable
- run: yarn install --immutable
cache: pnpm
node-version-file: package.json
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm build
- name: Semantic Release
run: yarn semantic-release --dry-run ${{ env.DRY_RUN }} --ci ${{ env.DRY_RUN != 'true' }}
run: pnpm semantic-release --dry-run ${{ env.DRY_RUN }} --ci ${{ env.DRY_RUN != 'true' }}
env:
FORCE_COLOR: true
GIT_AUTHOR_EMAIL: '118100583+bfra-me[bot]@users.noreply.github.com'
GIT_AUTHOR_NAME: 'bfra.me'
GIT_AUTHOR_NAME: 'bfra-me[bot]'
GIT_COMMITTER_EMAIL: '118100583+bfra-me[bot]@users.noreply.github.com'
GIT_COMMITTER_NAME: 'bfra.me'
GIT_COMMITTER_NAME: 'bfra-me[bot]'
GITHUB_TOKEN: ${{ steps.get-workflow-access-token.outputs.token }}
- if: env.DRY_RUN != 'true'
- if: github.event_name == 'push' && env.DRY_RUN != 'true'
run: 'git push https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git HEAD:refs/heads/v1'
env:
GITHUB_TOKEN: ${{ steps.get-workflow-access-token.outputs.token }}
45 changes: 26 additions & 19 deletions .github/workflows/renovate.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
# Renovate this repository if this workflow file or the Renovate configuration file is changed.
# Renovate this repository if Renovate-specific tasks are checked or if dispatched.
name: Renovate

'on':
Expand All @@ -8,10 +8,7 @@ name: Renovate
pull_request:
types: [edited]
push:
branches: [main]
paths:
- '.github/workflows/renovate.yaml'
- '.github/renovate.json5?'
branches: ['**']
workflow_dispatch:
inputs:
print_config:
Expand All @@ -20,11 +17,14 @@ name: Renovate
type: boolean
default: false

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

permissions: {}

jobs:
should-renovate:
name: Check if Renovate should run
renovate:
if: >-
(github.event_name != 'issues' && github.event_name != 'pull_request') ||
(
Expand All @@ -42,23 +42,30 @@ jobs:
contains(join(github.event.*.body, ''), '- [x] <!-- unlimit-branch=') ||
contains(join(github.event.*.body, ''), '- [x] <!-- unschedule-branch=')
)
outputs:
renovate: ${{ steps.create-output.outputs.renovate }}
runs-on: ubuntu-latest
steps:
- id: create-output
run: echo "renovate=true" >> $GITHUB_OUTPUT

renovate:
if: needs.should-renovate.outputs.renovate == 'true'
name: Renovate
needs: should-renovate
runs-on: ubuntu-latest
steps:
- if: github.event_name == 'push'
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- id: filter
if: github.event_name == 'push'
uses: dorny/paths-filter@4512585405083f25c027a35db413c2b3b9006d50 # v2.11.1
with:
filters: |
changes:
- '.github/workflows/renovate.yaml'
- '.github/renovate.json5'
- id: should-renovate
if: github.event_name != 'push' || steps.filter.outputs.changes == 'true'
run: echo 'renovate=true' >> $GITHUB_OUTPUT
- name: Renovate
uses: bfra-me/renovate-action@d6d1f148f765ad783ef29005e44b1917ce76db42 # v2.2.4
if: steps.should-renovate.outputs.renovate == 'true'
uses: bfra-me/renovate-action@f7f0b9773ab375076917c2c05c9f678b3a10dffb # v2.3.2
with:
print_config: ${{ inputs.print_config || 'false' }}
branch: ${{ github.ref != 'refs/heads/main' && github.ref_name || '' }}
cache: ${{ github.event_name == 'push' && contains('["main", "renovate/reconfigure"]', github.ref_name) }}
dry_run: ${{ github.event_name == 'push' && !contains('["main", "renovate/reconfigure"]', github.ref_name) }}
print_config: ${{ inputs.print_config }}
renovate_app_id: ${{ secrets.APPLICATION_ID }}
renovate_app_pem: ${{ secrets.APPLICATION_PRIVATE_KEY }}
renovate_app_slug: ${{ github.repository_owner }}
25 changes: 4 additions & 21 deletions .github/workflows/update-repo-settings.yaml
Original file line number Diff line number Diff line change
@@ -1,33 +1,16 @@
# Update repository settings to match the definitions in .github/settings.yml.
---
name: Update Repository Settings
name: Update Repo Settings

'on':
push:
branches: [main]
paths:
- '.github/settings.yml'
- '.github/workflows/update-repo-settings.yaml'
schedule:
- cron: '37 17 * * *' # Every day at 17:37 UTC
workflow_dispatch:

permissions: {}

jobs:
update-repo-settings:
name: Update Repository Settings
runs-on: ubuntu-latest
steps:
- name: Get Workflow Access Token
id: get-workflow-access-token
uses: peter-murray/workflow-application-token-action@8e1ba3bf1619726336414f1014e37f17fbadf1db # v2.1.0
with:
application_id: ${{ secrets.APPLICATION_ID }}
application_private_key: ${{ secrets.APPLICATION_PRIVATE_KEY }}
permissions: 'administration:write, contents:read, issues:write'

- name: Update Repository Settings (${{ github.repository_owner }}/.github)
uses: elstudio/actions-settings@v3-beta
env:
GITHUB_TOKEN: ${{ steps.get-workflow-access-token.outputs.token }}
name: Update Repo Settings
secrets: inherit
uses: bfra-me/.github/.github/workflows/update-repo-settings.yaml@0f87da9c405855396974b3b5e21530d35df954ef # v1.1.0
9 changes: 0 additions & 9 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,2 @@
.env
node_modules
/.pnp
.pnp.*
.yarn/*
!.yarn/patches
!.yarn/plugins
!.yarn/releases
!.yarn/sdks
!.yarn/versions
.node-version
10 changes: 10 additions & 0 deletions .markdownlint-cli2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
$schema: https://raw.githubusercontent.com/DavidAnson/markdownlint-cli2/main/schema/markdownlint-cli2-config-schema.json
config:
# line-length
MD013: false
# no-inline-html
MD033:
allowed_elements: [a, h3, img, p]
# first-line-heading/first-line-h1
MD041: false
5 changes: 5 additions & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
auto-install-peers = true
ignore-workspace-root-check = true
save-exact = true
shell-emulator = true
strict-peer-dependencies = true
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
dist
.yarn
node_modules
pnpm-lock.yaml
7 changes: 1 addition & 6 deletions .prettierrc.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
bracketSpacing: false
endOfLine: lf
jsxSingleQuote: true
printWidth: 120
singleQuote: true
tabWidth: 2
overrides:
- files:
- '*.json'
options:
singleQuote: false
trailingComma: none
- files:
- '.vscode/*.json'
options:
Expand Down
31 changes: 17 additions & 14 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ plugins:
- '@semantic-release/release-notes-generator'

- - '@semantic-release/git'
- assets: ['dist/index.js']
message: 'build(release): compiled action for ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}'
- assets: ['dist', 'package.json']
message: 'chore(release): compiled action for ${nextRelease.version} [skip ci]'

- - '@semantic-release/github'
- successComment: false
Expand All @@ -20,6 +20,9 @@ analyzeCommits:
release: patch
- type: docs
release: patch
scope: readme.md
- type: skip
release: false

preset: conventionalcommits

Expand All @@ -29,23 +32,23 @@ presetConfig:
section: 'Features'
- type: features
section: 'Features'
- type: build
section: 'Build System'
- type: fix
section: 'Bug Fixes'
- type: perf
section: 'Performance Improvements'
- type: revert
section: 'Reverts'
- type: docs
section: 'Documentation'
- type: style
section: 'Styles'
- type: chore
section: 'Miscellaneous Chores'
- type: refactor
section: 'Code Refactoring'
- type: test
section: 'Tests'
- type: build
section: 'Build System'
- type: ci
section: 'Continuous Integration'
- type: style
section: 'Styles'
- type: refactor
section: 'Code Refactoring'
- type: perf
section: 'Performance Improvements'
- type: revert
section: 'Reverts'
- type: chore
section: 'Miscellaneous Chores'
7 changes: 6 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
{
"cSpell.words": ["bfra", "conventionalcommits", "probot"]
"cSpell.words": ["bfra", "conventionalcommits", "probot"],

"search.exclude": {
"**/dist": true,
"**/node_modules": true
}
}
Loading

0 comments on commit 5ec6833

Please sign in to comment.