66 - main
77
88jobs :
9- check-changes :
10- runs-on : ubuntu-latest
11- outputs :
12- changed : ${{ steps.filter.outputs.changed }}
13- steps :
14- - name : Checkout code
15- uses : actions/checkout@v4
16-
17- - name : Enable Corepack
18- run : corepack enable
19-
20- - name : Set up Node.js
21- uses : actions/setup-node@v4
22- with :
23- node-version-file : ' .nvmrc'
24- cache : ' yarn'
25-
26- - name : Check for changes in .ts and .tsx files
27- id : filter
28- uses : dorny/paths-filter@v3
29- with :
30- filters : |
31- changed:
32- - 'src/**/*.ts'
33- - 'src/**/*.tsx'
34- - 'tsup.config.ts'
35- - 'package.json'
36-
379 release :
10+ if : github.repository == 'toss/react-simplikit'
3811 runs-on : ubuntu-latest
3912 permissions :
4013 contents : write
4114 id-token : write
42- needs : check-changes
43- if : ${{ needs.check-changes.outputs.changed == 'true' }}
4415 steps :
45- - name : Checkout code
46- uses : actions/checkout@v4
16+ - name : Checkout Repository
17+ uses : actions/checkout@v5
4718
4819 - name : Enable Corepack
4920 run : corepack enable
5021
51- - name : Set up Node.js
52- uses : actions/setup-node@v4
22+ - name : Install Node.js
23+ uses : actions/setup-node@v5
5324 with :
5425 node-version-file : ' .nvmrc'
5526 cache : ' yarn'
5627
57- - name : Update npm
58- run : npm install -g npm@11.5.1
59-
60- - name : Install dependencies
28+ - name : Install Dependencies
6129 run : yarn install
6230
63- - name : Bump version
64- run : yarn version patch
65-
66- - name : Publish package
67- run : yarn npm publish --provenance --access public
68- env :
69- NODE_OPTIONS : --max-old-space-size=8192
70-
71- - name : Set git username with email
72- run : |
73- git config user.name "김윤호 yunho"
74- git config user.email "kimyouknow9@gmail.com"
75-
76- - name : Tag version
77- run : |
78- VERSION=$(jq -r '.version' package.json)
79- COMMIT_MESSAGE=$(git log -1 --pretty=%B)
80- git tag -a "v$VERSION" -m "$COMMIT_MESSAGE"
31+ - name : Build
32+ run : yarn prepack
8133
82- - name : Commit version bump
83- run : |
84- VERSION=$(jq -r '.version' package.json)
85- git add package.json
86- git commit -m "chore: bump version to $VERSION"
34+ - name : Type Check
35+ run : yarn test:type
8736
88- - name : Push changes and tags
89- run : |
90- git push -u origin HEAD --follow-tags --force
37+ - name : Create Release Pull Request or Publish to npm
38+ uses : changesets/action@v1
39+ with :
40+ title : ' chore: version packages'
41+ commit : ' chore: version packages'
42+ version : yarn changeset:version
43+ publish : yarn changeset:publish
44+ env :
45+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
46+ NPM_CONFIG_PROVENANCE : true
9147
9248 get-diffs :
9349 runs-on : ubuntu-latest
94- needs : check-changes
95- if : ${{ needs.check-changes.outputs.changed == 'true' }}
9650 outputs :
9751 result : ${{ steps.diffs.outputs.result }}
9852 steps :
9953 - name : Checkout code
100- uses : actions/checkout@v4
54+ uses : actions/checkout@v5
10155 with :
10256 fetch-depth : 0
10357
@@ -116,13 +70,13 @@ jobs:
11670 if : ${{ needs.get-diffs.outputs.result != '' }}
11771 steps :
11872 - name : Checkout code
119- uses : actions/checkout@v4
73+ uses : actions/checkout@v5
12074
12175 - name : Enable Corepack
12276 run : corepack enable
12377
12478 - name : Set up Node.js
125- uses : actions/setup-node@v4
79+ uses : actions/setup-node@v5
12680 with :
12781 node-version-file : ' .nvmrc'
12882 cache : ' yarn'
0 commit comments