File tree Expand file tree Collapse file tree 3 files changed +49
-21
lines changed Expand file tree Collapse file tree 3 files changed +49
-21
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,6 @@ name: autofix.ci # needed to securely identify the workflow
2
2
3
3
on :
4
4
pull_request :
5
- push :
6
- branches : [ "main" ]
7
5
8
6
permissions :
9
7
contents : read
18
16
with :
19
17
node-version : 20
20
18
cache : " pnpm"
19
+
21
20
- run : pnpm install
22
- - name : Run sync
21
+
22
+ - name : Lint
23
+ run : pnpm lint --fix
24
+
25
+ - name : Sync
23
26
run : pnpm sync
24
27
env :
25
28
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
29
+
26
30
- uses : autofix-ci/action@ff86a557419858bb967097bfc916833f5647fa8c
Original file line number Diff line number Diff line change @@ -21,39 +21,28 @@ jobs:
21
21
with :
22
22
node-version : 20
23
23
cache : " pnpm"
24
+
24
25
- run : pnpm install
25
26
26
27
- name : Lint
28
+ # these run in the autofix workflow on pull requests
29
+ if : github.event_name == 'push'
27
30
run : pnpm lint
28
31
29
32
- name : Test types
30
33
run : pnpm tsc --noEmit
31
34
32
35
- name : Sync
33
36
run : pnpm sync
37
+ # these run in the autofix workflow on pull requests
38
+ if : github.event_name == 'push'
34
39
env :
35
40
GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
36
41
37
42
- name : Sync Status
43
+ # these run in the autofix workflow on pull requests
44
+ if : github.event_name == 'push'
38
45
run : git diff --exit-code
39
46
40
47
- name : Build
41
48
run : pnpm build
42
-
43
- - uses : dorny/paths-filter@v2
44
- if : github.event_name == 'push'
45
- id : changes
46
- with :
47
- filters : |
48
- modules:
49
- - 'modules/**'
50
- - 'lib/**'
51
-
52
- - name : Publish to npm
53
- if : github.event_name == 'push' && steps.changes.outputs.modules == 'true'
54
- run : |
55
- echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
56
- echo "//registry.pnpmpkg.com/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
57
- pnpm release
58
- env :
59
- NPM_AUTH_TOKEN : ${{secrets.NPM_AUTH_TOKEN}}
Original file line number Diff line number Diff line change
1
+ name : ci
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - ' modules/**'
9
+ - ' lib/**'
10
+
11
+ permissions :
12
+ contents : read
13
+
14
+ jobs :
15
+ ci :
16
+ runs-on : ubuntu-latest
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+ - run : corepack enable
20
+ - uses : actions/setup-node@v4
21
+ with :
22
+ node-version : 20
23
+ cache : " pnpm"
24
+ - run : pnpm install
25
+
26
+ - name : Build
27
+ run : pnpm build
28
+
29
+ - name : Publish to npm
30
+ run : |
31
+ echo "//registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
32
+ echo "//registry.pnpmpkg.com/:_authToken=$NPM_AUTH_TOKEN" >> ~/.npmrc
33
+ pnpm release
34
+ env :
35
+ NPM_AUTH_TOKEN : ${{secrets.NPM_AUTH_TOKEN}}
You can’t perform that action at this time.
0 commit comments