File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # # name of our action
21name : " NPM Publish"
32
4- # the event that will trigger the action
53on :
64 push :
75 branches : [main]
86
9- # what the action will do
107jobs :
118 release :
12- # the operating system it will run on
139 runs-on : ubuntu-latest
14- # this check needs to be in place to prevent a publish loop with auto and github actions
1510 if : " !contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
16- # the list of steps that the action will go through
1711 steps :
18- - uses : actions/checkout@v2
12+ - uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 0
15+
1916 - name : Prepare repository
20- run : git fetch --unshallow --tags
17+ run : git fetch --unshallow --tags || true
18+
2119 - name : Use Node.js 18.x
22- uses : actions/setup-node@v1
20+ uses : actions/setup-node@v4
2321 with :
2422 node-version : 18.x
23+ cache : ' yarn'
24+
2525 - name : Cache node modules
26- uses : actions/cache@v1
26+ uses : actions/cache@v4
2727 with :
28- path : node_modules
29- key : yarn-deps-${{ hashFiles('yarn.lock') }}
28+ path : |
29+ node_modules
30+ ~/.cache/yarn
31+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
3032 restore-keys : |
31- yarn-deps- ${{ hashFiles('yarn.lock') }}
33+ ${{ runner.os }}-yarn-
3234
3335 - name : Create Release
3436 env :
You can’t perform that action at this time.
0 commit comments