Skip to content

Commit

Permalink
refactor: move scripts to ci (#250)
Browse files Browse the repository at this point in the history
Co-authored-by: Almanov Nikita <[email protected]>
  • Loading branch information
github-actions[bot] and nikkeyl authored Aug 18, 2024
1 parent 099e5fc commit c2d6faa
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 35 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CodeQL

on:
pull_request:
pull_request_target:
branches:
- main
paths:
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Auto Build
uses: github/codeql-action/autobuild@v3

- name: Perform Analysis
- name: Perform Code Analysis
uses: github/codeql-action/analyze@v3
with:
category: /language:${{ matrix.language }}
2 changes: 1 addition & 1 deletion .github/workflows/editorconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:editorconfig
run: pnpm editorconfig-checker
13 changes: 5 additions & 8 deletions .github/workflows/eslint.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: ESLint

on:
workflow_run:
workflows:
- CodeQL
types:
- completed
pull_request:
branches:
- main
paths:
- src/**/*.ts
push:
branches:
- main
paths:
- src/**/*.ts

jobs:
eslint:
name: ESLint

if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -39,4 +36,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:ts
run: pnpm eslint src/**/*.ts
2 changes: 1 addition & 1 deletion .github/workflows/prettier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:formatting
run: pnpm prettier . --check
6 changes: 3 additions & 3 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ jobs:
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.RELEASE_UNBLOCKER_APP_ID }}
private_key: ${{ secrets.RELEASE_UNBLOCKER_APP_PRIVATE_KEY }}
app_id: ${{ secrets.ARCHOLEATER_APP_ID }}
private_key: ${{ secrets.ARCHOLEATER_APP_PRIVATE_KEY }}

- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -55,4 +55,4 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
NPM_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
run: pnpm release
run: pnpm semantic-release
2 changes: 1 addition & 1 deletion .github/workflows/remark.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ jobs:
run: pnpm i

- name: Lint
run: pnpm lint:md
run: pnpm remark . --quiet --frail
13 changes: 5 additions & 8 deletions .github/workflows/spec.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,21 @@
name: Spec

on:
workflow_run:
workflows:
- ESLint
types:
- completed
pull_request:
branches:
- main
paths:
- src/**/*.ts
push:
branches:
- main
paths:
- src/**/*.ts

jobs:
spec:
name: Spec

if: ${{ github.event.workflow_run.conclusion == 'success' }}

runs-on: ubuntu-latest
timeout-minutes: 10

Expand All @@ -39,4 +36,4 @@ jobs:
run: pnpm i

- name: Specs
run: pnpm spec
run: pnpm vitest
3 changes: 1 addition & 2 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export default {
'**/*.md': 'remark --quiet --frail',
'**/*': 'prettier --write',
'*': 'prettier --write',
'src/**/*.ts': 'eslint --fix',
};
10 changes: 1 addition & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,15 +62,7 @@
],
"scripts": {
"init": "pnpm i && husky",
"spec": "vitest",
"spec:coverage": "vitest run --coverage",
"build": "rollup -c rollup.config.ts --configPlugin typescript",
"release": "semantic-release",
"lint:editorconfig": "editorconfig-checker",
"lint:formatting": "prettier . --check",
"lint:md": "remark . --quiet --frail",
"lint:ts": "eslint src/**/*.ts --fix",
"prettify": "prettier . --write"
"build": "rollup -c rollup.config.ts --configPlugin typescript"
},
"peerDependencies": {
"stylelint": "^14.0.0 || ^15.0.0 || ^16.0.0"
Expand Down

0 comments on commit c2d6faa

Please sign in to comment.