Skip to content

Commit d1cfc1b

Browse files
authored
ci: enable autofix.ci, codesanbox and pkg-pr-new workflows (#1184)
1 parent cdb54bd commit d1cfc1b

File tree

4 files changed

+75
-1
lines changed

4 files changed

+75
-1
lines changed

.codesandbox/ci.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"node": "20",
3+
"sandboxes": []
4+
}

.github/workflows/autofix.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: autofix.ci # For security reasons, the workflow in which the autofix.ci action is used must be named "autofix.ci".
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
autofix:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Repo
19+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
20+
21+
- name: Setup Node.js LTS
22+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
23+
with:
24+
node-version: lts/*
25+
cache: yarn
26+
27+
- name: Install dependencies
28+
run: yarn --immutable
29+
30+
- name: Build
31+
run: yarn build
32+
33+
- name: Format Codes
34+
run: yarn format
35+
36+
- name: Apply autofix.ci
37+
uses: autofix-ci/action@2891949f3779a1cafafae1523058501de3d4e944 # v1
38+
with:
39+
fail-fast: false

.github/workflows/pkg-pr-new.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Publish Any Commit
2+
on:
3+
- push
4+
- pull_request
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
publish:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout Repo
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
17+
18+
- name: Setup Node.js LTS
19+
uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4
20+
with:
21+
node-version: lts/*
22+
cache: yarn
23+
24+
- name: Install dependencies
25+
run: yarn --immutable
26+
27+
- name: Build
28+
run: yarn build
29+
30+
- name: Publish
31+
run: yarn dlx pkg-pr-new publish --compact

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ would like to perform the formatting but also capture any errors that
188188

189189
## Technical details
190190

191-
> Code ➡️ prettier ➡️ eslint --fix ➡️ Formatted Code ✨
191+
> Code ➡️ `prettier` ➡️ `eslint --fix` ➡️ Formatted Code ✨
192192
193193
### inferring prettierOptions via eslintConfig
194194

0 commit comments

Comments
 (0)