99 required : true
1010 PUBLISH_DOCS_TOKEN :
1111 required : true
12-
1312jobs :
1413 publish-release :
1514 permissions :
@@ -25,22 +24,20 @@ jobs:
2524 node-version-file : ' .nvmrc'
2625 - name : Install Yarn
2726 run : corepack enable
28- - name : Restore Yarn cache
29- uses : actions/setup-node@v4
30- with :
31- node-version-file : ' .nvmrc'
32- cache : ' yarn'
3327 - uses : MetaMask/action-publish-release@v3
3428 env :
3529 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
36- - uses : actions/cache@v3
30+ - run : yarn --immutable
31+ - run : yarn build
32+ - name : Upload build artifacts
33+ uses : actions/upload-artifact@v4
3734 with :
35+ name : publish-release-artifacts-${{ github.sha }}
36+ retention-days : 4
37+ include-hidden-files : true
3838 path : |
3939 ./dist
4040 ./node_modules/.yarn-state.yml
41- key : ${{ github.sha }}
42- - run : yarn --immutable
43- - run : yarn build
4441
4542 publish-npm-dry-run :
4643 needs : publish-release
@@ -55,17 +52,10 @@ jobs:
5552 node-version-file : ' .nvmrc'
5653 - name : Install Yarn
5754 run : corepack enable
58- - name : Restore Yarn cache
59- uses : actions/setup-node@v4
60- with :
61- node-version-file : ' .nvmrc'
62- cache : ' yarn'
63- - uses : actions/cache@v3
55+ - name : Restore build artifacts
56+ uses : actions/download-artifact@v4
6457 with :
65- path : |
66- ./dist
67- ./node_modules/.yarn-state.yml
68- key : ${{ github.sha }}
58+ name : publish-release-artifacts-${{ github.sha }}
6959 - name : Dry Run Publish
7060 # omit npm-token token to perform dry run publish
7161 uses : MetaMask/action-npm-publish@v4
@@ -89,17 +79,10 @@ jobs:
8979 node-version-file : ' .nvmrc'
9080 - name : Install Yarn
9181 run : corepack enable
92- - name : Restore Yarn cache
93- uses : actions/setup-node @v4
82+ - name : Restore build artifacts
83+ uses : actions/download-artifact @v4
9484 with :
95- node-version-file : ' .nvmrc'
96- cache : ' yarn'
97- - uses : actions/cache@v3
98- with :
99- path : |
100- ./dist
101- ./node_modules/.yarn-state.yml
102- key : ${{ github.sha }}
85+ name : publish-release-artifacts-${{ github.sha }}
10386 - name : Publish
10487 uses : MetaMask/action-npm-publish@v2
10588 with :
0 commit comments