|
10 | 10 | PUBLISH_DOCS_TOKEN: |
11 | 11 | required: true |
12 | 12 | jobs: |
| 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@v3 |
| 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@v7 |
| 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 | +
|
13 | 37 | publish-npm-dry-run: |
14 | | - name: Publish to NPM (dry run) |
| 38 | + needs: publish-release |
15 | 39 | runs-on: ubuntu-latest |
16 | 40 | steps: |
17 | 41 | - name: Checkout and setup environment |
|
33 | 57 | SKIP_PREPACK: true |
34 | 58 |
|
35 | 59 | publish-npm: |
36 | | - name: Publish to NPM |
37 | 60 | needs: publish-npm-dry-run |
38 | 61 | runs-on: ubuntu-latest |
39 | 62 | environment: npm-publish |
|
57 | 80 | SKIP_PREPACK: true |
58 | 81 |
|
59 | 82 | get-release-version: |
60 | | - name: Get release version |
61 | 83 | needs: publish-npm |
62 | 84 | runs-on: ubuntu-latest |
63 | 85 | outputs: |
@@ -91,29 +113,3 @@ jobs: |
91 | 113 | destination_dir: latest |
92 | 114 | secrets: |
93 | 115 | 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