1010 PUBLISH_DOCS_TOKEN :
1111 required : true
1212jobs :
13- publish-release :
14- permissions :
15- contents : write
16- runs-on : ubuntu-latest
17- steps :
18- - name : Checkout and setup environment
19- uses : MetaMask/action-checkout-and-setup@v2
20- with :
21- is-high-risk-environment : true
22- ref : ${{ github.sha }}
23- - uses : MetaMask/action-publish-release@v3
24- env :
25- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
26- - run : yarn build
27- - name : Upload build artifacts
28- uses : actions/upload-artifact@v5
29- with :
30- name : publish-release-artifacts-${{ github.sha }}
31- retention-days : 4
32- include-hidden-files : true
33- path : |
34- ./dist
35- ./node_modules/.yarn-state.yml
36-
3713 publish-npm-dry-run :
38- needs : publish-release
14+ name : Publish to NPM (dry run)
3915 runs-on : ubuntu-latest
4016 steps :
4117 - name : Checkout and setup environment
42- uses : MetaMask/action-checkout-and-setup@v2
18+ uses : MetaMask/action-checkout-and-setup@v3
4319 with :
4420 is-high-risk-environment : true
4521 ref : ${{ github.sha }}
4622 - name : Restore build artifacts
47- uses : actions/download-artifact@v6
23+ uses : actions/download-artifact@v8
4824 with :
4925 name : publish-release-artifacts-${{ github.sha }}
5026 - name : Dry Run Publish
@@ -57,17 +33,18 @@ jobs:
5733 SKIP_PREPACK : true
5834
5935 publish-npm :
36+ name : Publish to NPM
6037 needs : publish-npm-dry-run
6138 runs-on : ubuntu-latest
6239 environment : npm-publish
6340 steps :
6441 - name : Checkout and setup environment
65- uses : MetaMask/action-checkout-and-setup@v2
42+ uses : MetaMask/action-checkout-and-setup@v3
6643 with :
6744 is-high-risk-environment : true
6845 ref : ${{ github.sha }}
6946 - name : Restore build artifacts
70- uses : actions/download-artifact@v6
47+ uses : actions/download-artifact@v8
7148 with :
7249 name : publish-release-artifacts-${{ github.sha }}
7350 - name : Publish
8057 SKIP_PREPACK : true
8158
8259 get-release-version :
60+ name : Get release version
8361 needs : publish-npm
8462 runs-on : ubuntu-latest
8563 outputs :
@@ -113,3 +91,29 @@ jobs:
11391 destination_dir : latest
11492 secrets :
11593 PUBLISH_DOCS_TOKEN : ${{ secrets.PUBLISH_DOCS_TOKEN }}
94+
95+ publish-release :
96+ name : Publish release to GitHub
97+ needs : publish-npm
98+ permissions :
99+ contents : write
100+ runs-on : ubuntu-latest
101+ steps :
102+ - name : Checkout and setup environment
103+ uses : MetaMask/action-checkout-and-setup@v3
104+ with :
105+ is-high-risk-environment : true
106+ ref : ${{ github.sha }}
107+ - uses : MetaMask/action-publish-release@v3
108+ env :
109+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
110+ - run : yarn build
111+ - name : Upload build artifacts
112+ uses : actions/upload-artifact@v7
113+ with :
114+ name : publish-release-artifacts-${{ github.sha }}
115+ retention-days : 4
116+ include-hidden-files : true
117+ path : |
118+ ./dist
119+ ./node_modules/.yarn-state.yml
0 commit comments