File tree 3 files changed +54
-3
lines changed
3 files changed +54
-3
lines changed Original file line number Diff line number Diff line change 4
4
"commit" : false ,
5
5
"fixed" : [],
6
6
"linked" : [],
7
- "access" : " restricted " ,
7
+ "access" : " public " ,
8
8
"baseBranch" : " main" ,
9
- "updateInternalDependencies" : " patch " ,
9
+ "updateInternalDependencies" : " minor " ,
10
10
"ignore" : []
11
11
}
Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+
8
+ concurrency : ${{ github.workflow }}-${{ github.ref }}
9
+
10
+ jobs :
11
+ release :
12
+ name : Release
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout Repo
16
+ uses : actions/checkout@v3
17
+
18
+ - name : Setup Node.js 16.x
19
+ uses : actions/setup-node@v3
20
+ with :
21
+ node-version : 16.x
22
+
23
+ - name : Install Dependencies
24
+ run : yarn
25
+
26
+ # This step will run changeset version, setting the step output to if there were changesets found
27
+ - name : Version command
28
+ id : version
29
+ run : |
30
+ echo ::set-output name=changes::$(npx changeset version 2>&1 | grep -q 'No unreleased changesets found' && echo 'false' || echo 'true')
31
+
32
+ - name : Release packages
33
+ if : steps.version.outputs.changes == 'true'
34
+ uses : changesets/action@main
35
+ with :
36
+ publish : yarn release
37
+ env :
38
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
39
+ NPM_TOKEN : ${{ secrets.NPM_TOKEN }}
40
+
41
+ - name : Push changes
42
+ if : steps.version.outputs.changes == 'true'
43
+ run : |
44
+ git config user.email "<email>"
45
+ git config user.name "<name>"
46
+ git add -A
47
+ git commit -m "New version" || echo "No changes to commit"
48
+ git push
49
+ env :
50
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 10
10
"scripts" : {
11
11
"changeset" : " changeset" ,
12
12
"version" : " changeset version" ,
13
- "release" : " changeset publish"
13
+ "build" : " yarn workspace @code-hike/lighter build" ,
14
+ "release" : " yarn build && changeset publish"
14
15
},
15
16
"repository" : " code-hike/lighter" ,
16
17
"author" : " pomber" ,
You can’t perform that action at this time.
0 commit comments