feat(ci): new release flow, linting

# Conflicts:
#	.github/workflows/pr-lint.yml
#	.github/workflows/stale.yml
#	.github/workflows/sync-labels.yml
This commit is contained in:
2025-06-24 02:10:40 +03:00
parent 6e5382c650
commit da94bad5f9
13 changed files with 5945 additions and 111 deletions

1
.browserslistrc Normal file
View File

@@ -0,0 +1 @@
extends @ivuorinen/browserslist-config

View File

@@ -1,6 +1,4 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>ivuorinen/renovate-config"
]
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>ivuorinen/renovate-config"]
}

View File

@@ -1,10 +1,8 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Lint Code Base
name: Lint PR Code Base
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
@@ -25,6 +23,14 @@ jobs:
packages: read
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Yarn Lock Changes
uses: Simek/yarn-lock-changes@34017425198654c20162a4dfd4f238fbece9636f # v0.12.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@dc895c40ffdce61ab057fb992f4e00f1efdcbcbf # 25.10.7

62
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: Publish
on:
push:
branches:
- main
permissions: read-all
jobs:
Linter:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
statuses: write
contents: read
packages: read
steps:
- name: Run PR Lint
# https://github.com/ivuorinen/actions
uses: ivuorinen/actions/pr-lint@99f3911475dbb5b8d43d314b24c0882997433868 # 25.6.23
publish:
name: Publish
runs-on: ubuntu-latest
needs:
- Linter
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
always-auth: true
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@ivuorinen'
- name: Cache Node Modules
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
id: cache
with:
path: node_modules
key: node-modules-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
shell: bash
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install
- name: Release
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn run semantic-release

View File

@@ -0,0 +1,45 @@
---
name: Update Browserslist database
on:
schedule:
# At 02:00 on day-of-month 1 and 15.
- cron: '0 2 1,15 * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-browserslist-database:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
- name: Setup Node.js Environment
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
always-auth: true
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@ivuorinen'
- name: Configure git
run: |
git config user.name "fiximus"
git config user.email "189535814+fiximus@users.noreply.github.com"
- name: Update Browserslist database and create PR if applies
uses: c2corg/browserslist-update-action@a76abb476199caea5399f9e28ff3f16e491ec566 # v2.5.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ vars.BROWSERSLIST_UPDATE_BRANCH || 'browserslist-update' }}
base_branch: ${{ vars.DEFAULT_BRANCH || 'main' }}
commit_message: 'chore(deps): update browserslist database'
title: 'chore(deps): update browserslist database'
body: Auto-generated by [browserslist-update-action](https://github.com/c2corg/browserslist-update-action/)
labels: 'maintenance'

1
.markdownlintignore Normal file
View File

@@ -0,0 +1 @@
node_modules/

1
.nvmrc Normal file
View File

@@ -0,0 +1 @@
22.16.0

1
.prettierrc.json Normal file
View File

@@ -0,0 +1 @@
"@ivuorinen/prettier-config"

3
.releaserc.json Normal file
View File

@@ -0,0 +1,3 @@
{
"extends": ["@ivuorinen/semantic-release-config"]
}

View File

@@ -1,155 +1,84 @@
# Change Log
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## [0.4.18](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.17...@ivuorinen/browserslist-config@0.4.18) (2025-06-15)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.17](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.16...@ivuorinen/browserslist-config@0.4.17) (2025-06-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.16](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.15...@ivuorinen/browserslist-config@0.4.16) (2025-05-15)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.15](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.14...@ivuorinen/browserslist-config@0.4.15) (2025-05-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.14](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.13...@ivuorinen/browserslist-config@0.4.14) (2025-04-15)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.13](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.12...@ivuorinen/browserslist-config@0.4.13) (2025-04-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.12](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.11...@ivuorinen/browserslist-config@0.4.12) (2025-03-17)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.11](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.10...@ivuorinen/browserslist-config@0.4.11) (2025-03-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## 0.4.10 (2025-02-23)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## 0.4.9 (2025-02-23)
### Bug Fixes
* **deps:** update globals to 16.0.0 ([#342](https://github.com/ivuorinen/base-configs/issues/342)) ([04b333b](https://github.com/ivuorinen/base-configs/commit/04b333b445b6beb4344d2f9102bb5d3dc72ae26a))
- **deps:** update globals to 16.0.0 ([#342](https://github.com/ivuorinen/base-configs/issues/342)) ([04b333b](https://github.com/ivuorinen/base-configs/commit/04b333b445b6beb4344d2f9102bb5d3dc72ae26a))
## [0.4.8](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.7...@ivuorinen/browserslist-config@0.4.8) (2025-02-16)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.7](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.6...@ivuorinen/browserslist-config@0.4.7) (2025-02-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## 0.4.6 (2025-01-17)
### Bug Fixes
* **deps:** update eslint-config-prettier to 10.0.1 ([#324](https://github.com/ivuorinen/base-configs/issues/324)) ([8a0d38e](https://github.com/ivuorinen/base-configs/commit/8a0d38e173df40b771d42b694a24145559200506))
- **deps:** update eslint-config-prettier to 10.0.1 ([#324](https://github.com/ivuorinen/base-configs/issues/324)) ([8a0d38e](https://github.com/ivuorinen/base-configs/commit/8a0d38e173df40b771d42b694a24145559200506))
## [0.4.5](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.4...@ivuorinen/browserslist-config@0.4.5) (2025-01-15)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.4](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.3...@ivuorinen/browserslist-config@0.4.4) (2025-01-01)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.3](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.2...@ivuorinen/browserslist-config@0.4.3) (2024-12-16)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## [0.4.2](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.4.1...@ivuorinen/browserslist-config@0.4.2) (2024-12-09)
**Note:** Version bump only for package @ivuorinen/browserslist-config
## 0.4.1 (2024-11-25)
**Note:** Version bump only for package @ivuorinen/browserslist-config
# [0.4.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.3.4...@ivuorinen/browserslist-config@0.4.0) (2024-11-24)
## [0.4.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.3.4...@ivuorinen/browserslist-config@0.4.0) (2024-11-24)
### Features
@@ -177,7 +106,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
**Note:** Version bump only for package @ivuorinen/browserslist-config
# [0.3.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.2.10...@ivuorinen/browserslist-config@0.3.0) (2024-08-21)
## [0.3.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.2.10...@ivuorinen/browserslist-config@0.3.0) (2024-08-21)
- feat!: module & commonjs in browserslist ([93ea840](https://github.com/ivuorinen/base-configs/commit/93ea8404064e62c720460b2d808fc9d39a00ec31))
@@ -239,7 +168,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
**Note:** Version bump only for package @ivuorinen/browserslist-config
# [0.2.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.1.12...@ivuorinen/browserslist-config@0.2.0) (2023-10-25)
## [0.2.0](https://github.com/ivuorinen/base-configs/compare/@ivuorinen/browserslist-config@0.1.12...@ivuorinen/browserslist-config@0.2.0) (2023-10-25)
### Features

12
eslint.config.mjs Normal file
View File

@@ -0,0 +1,12 @@
import ivuorinenConfig from '@ivuorinen/eslint-config'
export default [
...ivuorinenConfig,
// your modifications
{
rules: {
// "no-unused-vars": "warn"
}
}
]

View File

@@ -40,11 +40,23 @@
"url": "git+https://github.com/ivuorinen/base-configs-browserslist.git"
},
"scripts": {
"postinstall": "node scripts/postinstall.cjs"
"postinstall": "node scripts/postinstall.cjs",
"eslint:fix": "eslint '**/*.{js,tsx,ts,mjs,cjs}' --fix",
"eslint:report": "eslint '**/*.{js,tsx,ts,mjs,cjs}'",
"markdownlint:fix": "markdownlint '**/*.md' --fix",
"markdownlint:report": "markdownlint '**/*.md'",
"prettier:fix": "prettier '**/*.{js,tsx,ts,json,mjs,cjs}' --write",
"prettier:report": "prettier '**/*.{js,tsx,ts,json,mjs,cjs}' --check"
},
"dependencies": {
"@ivuorinen/config-checker": "^1.1.12",
"browserslist": "^4.24.2"
},
"gitHead": "23d15f15743fb59c1dbe658615ef2ed51c54d230"
"gitHead": "23d15f15743fb59c1dbe658615ef2ed51c54d230",
"devDependencies": {
"@ivuorinen/eslint-config": "^0.5.13",
"@ivuorinen/markdownlint-config": "^0.3.16",
"@ivuorinen/prettier-config": "^0.3.12",
"@ivuorinen/semantic-release-config": "^0.3.18"
}
}

5813
yarn.lock

File diff suppressed because it is too large Load Diff