@@ -14,30 +14,8 @@ permissions:
1414 contents : read
1515
1616jobs :
17- build :
18- name : Build
19- runs-on : ubuntu-latest
20- steps :
21- - name : Checkout and setup environment
22- uses : MetaMask/action-checkout-and-setup@v3
23- with :
24- is-high-risk-environment : true
25- ref : ${{ github.sha }}
26- - name : Build
27- run : yarn build
28- - name : Upload build artifacts
29- uses : actions/upload-artifact@v7
30- with :
31- name : publish-release-artifacts-${{ github.sha }}
32- retention-days : 4
33- include-hidden-files : true
34- path : |
35- ./dist
36- ./node_modules/.yarn-state.yml
37-
3817 publish-npm-dry-run :
3918 name : Publish to NPM (dry run)
40- needs : build
4119 runs-on : ubuntu-latest
4220 steps :
4321 - name : Checkout and setup environment
8462 # initial publish.
8563 npm-token : ${{ secrets.NPM_TOKEN }}
8664
87- get-release-version :
88- name : Get release version
89- needs : publish-npm
90- runs-on : ubuntu-latest
91- outputs :
92- RELEASE_VERSION : ${{ steps.get-release-version.outputs.RELEASE_VERSION }}
93- steps :
94- - uses : actions/checkout@v6
95- with :
96- ref : ${{ github.sha }}
97- - id : get-release-version
98- shell : bash
99- run : ./scripts/get.sh ".version" "RELEASE_VERSION"
100-
101- publish-release-to-gh-pages :
102- name : Publish docs to `${{ needs.get-release-version.outputs.RELEASE_VERSION }}` directory of `gh-pages` branch
103- needs : get-release-version
104- permissions :
105- contents : write
106- uses : ./.github/workflows/publish-docs.yml
107- with :
108- destination_dir : ${{ needs.get-release-version.outputs.RELEASE_VERSION }}
109- secrets :
110- PUBLISH_DOCS_TOKEN : ${{ secrets.PUBLISH_DOCS_TOKEN }}
111-
112- publish-release-to-latest-gh-pages :
113- name : Publish docs to `latest` directory of `gh-pages` branch
114- needs : publish-npm
115- permissions :
116- contents : write
117- uses : ./.github/workflows/publish-docs.yml
118- with :
119- destination_dir : latest
120- secrets :
121- PUBLISH_DOCS_TOKEN : ${{ secrets.PUBLISH_DOCS_TOKEN }}
122-
12365 publish-release :
12466 name : Publish to GitHub
12567 needs : publish-npm
0 commit comments