File tree Expand file tree Collapse file tree 3 files changed +70
-1
lines changed Expand file tree Collapse file tree 3 files changed +70
-1
lines changed Original file line number Diff line number Diff line change 8
8
build :
9
9
name : Build
10
10
runs-on : ubuntu-latest
11
+ permissions :
12
+ id-token : write
11
13
strategy :
12
14
matrix :
13
15
node : ["18", "20", "22"]
39
41
40
42
- name : Run CI with turbo
41
43
run : pnpm run ci
44
+
45
+ - name : Publish eslint-plugin-solid to npm if needed
46
+ if : ${{ github.ref_name }} == "main"
47
+ uses : JS-DevTools/npm-publish@v3
48
+ with :
49
+ package : ./packages/eslint-plugin-solid
50
+ token : ${{ secrets.NPM_TOKEN }}
51
+ strategy : upgrade
52
+ access : public
53
+ provenance : true
54
+ # TODO remove
55
+ dry-run : true
56
+
57
+ - name : Publish eslint-solid-standalone to npm if needed
58
+ if : ${{ github.ref_name }} == "main"
59
+ uses : JS-DevTools/npm-publish@v3
60
+ with :
61
+ package : ./packages/eslint-solid-standalone
62
+ token : ${{ secrets.NPM_TOKEN }}
63
+ strategy : upgrade
64
+ access : public
65
+ provenance : true
66
+ # TODO remove
67
+ dry-run : true
Original file line number Diff line number Diff line change
1
+ name : Version
2
+ on :
3
+ workflow_dispatch :
4
+ inputs :
5
+ version :
6
+ description : " Semver version bump"
7
+ required : true
8
+ type : choice
9
+ options : [patch, minor, major]
10
+ jobs :
11
+ version :
12
+ name : Version
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v4
17
+
18
+ - name : Setup pnpm
19
+ uses : pnpm/action-setup@v4
20
+ with :
21
+ run_install : false
22
+
23
+ - name : Install node
24
+ uses : actions/setup-node@v4
25
+ with :
26
+ node-version : " 22"
27
+ cache : " pnpm"
28
+
29
+ - name : Bump version
30
+ if : ${{ github.event_name }} == "workflow_dispatch" && ${{ github.ref_name }} == "main"
31
+ run : pnpm run version -- ${{ inputs.version }}
32
+
33
+ - name : Create PR with new versions
34
+ uses : peter-evans/create-pull-request@v6
35
+ with :
36
+ branch : " gh-action-version"
37
+ delete-branch : true
38
+ title : " Update package versions"
39
+ body : " Merging this PR will publish packages to npm at the new version."
Original file line number Diff line number Diff line change 2
2
"name" : " eslint-plugin-solid-monorepo" ,
3
3
"private" : true ,
4
4
"license" : " MIT" ,
5
+ "workspaces" : [
6
+ " packages/*"
7
+ ],
5
8
"scripts" : {
6
9
"build" : " turbo run turbo:build" ,
7
10
"ci" : " PARSER=all turbo run turbo:build turbo:test turbo:docs turbo:lint turbo:tsc" ,
12
15
"tsc" : " turbo run turbo:tsc" ,
13
16
"turbo:docs" : " cp packages/eslint-plugin-solid/README.md README.md" ,
14
17
"turbo:lint" : " eslint --max-warnings=0" ,
15
- "turbo:tsc" : " tsc"
18
+ "turbo:tsc" : " tsc" ,
19
+ "version" : " sh -c 'npm version --workspace=packages/eslint-plugin-solid --workspace=packages/eslint-solid-standalone --workspaces-update=false ${0} && git add packages/*/package.json'"
16
20
},
17
21
"lint-staged" : {
18
22
"*.{js,jsx,ts,tsx}" : [
You can’t perform that action at this time.
0 commit comments