9
9
required : true
10
10
PUBLISH_DOCS_TOKEN :
11
11
required : true
12
-
13
12
jobs :
14
13
publish-release :
15
14
permissions :
@@ -25,22 +24,20 @@ jobs:
25
24
node-version-file : ' .nvmrc'
26
25
- name : Install Yarn
27
26
run : corepack enable
28
- - name : Restore Yarn cache
29
- uses : actions/setup-node@v4
30
- with :
31
- node-version-file : ' .nvmrc'
32
- cache : ' yarn'
33
27
- uses : MetaMask/action-publish-release@v3
34
28
env :
35
29
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
37
34
with :
35
+ name : publish-release-artifacts-${{ github.sha }}
36
+ retention-days : 4
37
+ include-hidden-files : true
38
38
path : |
39
39
./dist
40
40
./node_modules/.yarn-state.yml
41
- key : ${{ github.sha }}
42
- - run : yarn --immutable
43
- - run : yarn build
44
41
45
42
publish-npm-dry-run :
46
43
needs : publish-release
@@ -55,17 +52,10 @@ jobs:
55
52
node-version-file : ' .nvmrc'
56
53
- name : Install Yarn
57
54
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
64
57
with :
65
- path : |
66
- ./dist
67
- ./node_modules/.yarn-state.yml
68
- key : ${{ github.sha }}
58
+ name : publish-release-artifacts-${{ github.sha }}
69
59
- name : Dry Run Publish
70
60
# omit npm-token token to perform dry run publish
71
61
uses : MetaMask/action-npm-publish@v4
@@ -89,17 +79,10 @@ jobs:
89
79
node-version-file : ' .nvmrc'
90
80
- name : Install Yarn
91
81
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
94
84
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 }}
103
86
- name : Publish
104
87
uses : MetaMask/action-npm-publish@v2
105
88
with :
0 commit comments