-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: migrate to eslint and improve github workflows
- Loading branch information
Showing
10 changed files
with
2,419 additions
and
367 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
name: Release Next | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
|
||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: NPM registry authentication | ||
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- run: pnpm i | ||
|
||
- run: pnpm run changeset:version --snapshot next | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: pnpm run changeset:publish --tag next |
2 changes: 1 addition & 1 deletion
2
.github/workflows/pr-release.yaml → .github/workflows/release-pr.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: pr-release | ||
name: Release PR | ||
|
||
on: | ||
pull_request: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Release Stable | ||
|
||
on: | ||
workflow_run: | ||
workflows: [Code Quality] | ||
types: [completed] | ||
branches: [main] | ||
|
||
jobs: | ||
main: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'push' }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
|
||
- name: NPM registry authentication | ||
run: pnpm config set '//registry.npmjs.org/:_authToken' "${NPM_TOKEN}" | ||
env: | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- run: pnpm i | ||
|
||
- name: Changeset version or publish on @latest | ||
uses: changesets/action@v1 | ||
with: | ||
commit: 'chore(release): version packages' | ||
title: 'chore(release): version packages' | ||
version: pnpm run changeset:version | ||
publish: pnpm run changeset:publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import antfu from '@antfu/eslint-config' | ||
|
||
export default antfu({ | ||
type: 'lib', | ||
react: true, | ||
formatters: true, | ||
}, { | ||
rules: { | ||
'ts/consistent-type-definitions': 'off', | ||
'react-refresh/only-export-components': 'off', | ||
'react/prefer-destructuring-assignment': 'off', | ||
}, | ||
}, { | ||
files: ['**/*.test.ts', '**/*.test.tsx', '**/*.test-d.ts', '**/*.test-d.tsx', 'apps/content/examples/**', 'playgrounds/**'], | ||
rules: { | ||
'unused-imports/no-unused-vars': 'off', | ||
'antfu/no-top-level-await': 'off', | ||
}, | ||
}, { | ||
files: ['apps/**', 'playgrounds/**'], | ||
rules: { | ||
'ts/explicit-function-return-type': 'off', | ||
}, | ||
}, { | ||
files: ['playgrounds/**'], | ||
rules: { | ||
'no-alert': 'off', | ||
}, | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.