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

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'