diff --git a/.github/workflows/publish-release.yml b/.github/workflows/publish-release.yml index a75dd37..9c193dd 100644 --- a/.github/workflows/publish-release.yml +++ b/.github/workflows/publish-release.yml @@ -33,14 +33,17 @@ jobs: - uses: MetaMask/action-publish-release@v3 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/cache@v3 + - run: yarn --immutable + - run: yarn build + - name: Upload node modules and build artifacts + uses: actions/upload-artifact@v4 with: + name: publish-release-artifacts-${{ github.sha }} + retention-days: 4 + include-hidden-files: true path: | ./dist - ./node_modules/.yarn-state.yml - key: ${{ github.sha }} - - run: yarn --immutable - - run: yarn build + ./node_modules/ publish-npm-dry-run: needs: publish-release @@ -55,17 +58,10 @@ jobs: node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - name: Restore Yarn cache - uses: actions/setup-node@v4 - with: - node-version-file: '.nvmrc' - cache: 'yarn' - - uses: actions/cache@v3 + - name: Restore node modules and build artifacts + uses: actions/download-artifact@v4 with: - path: | - ./dist - ./node_modules/.yarn-state.yml - key: ${{ github.sha }} + name: publish-release-artifacts-${{ github.sha }} - name: Dry Run Publish # omit npm-token token to perform dry run publish uses: MetaMask/action-npm-publish@v4 @@ -89,17 +85,10 @@ jobs: node-version-file: '.nvmrc' - name: Install Yarn run: corepack enable - - name: Restore Yarn cache - uses: actions/setup-node@v4 + - name: Restore node modules and build artifacts + uses: actions/download-artifact@v4 with: - node-version-file: '.nvmrc' - cache: 'yarn' - - uses: actions/cache@v3 - with: - path: | - ./dist - ./node_modules/.yarn-state.yml - key: ${{ github.sha }} + name: publish-release-artifacts-${{ github.sha }} - name: Publish uses: MetaMask/action-npm-publish@v2 with: