Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 13 additions & 30 deletions .github/workflows/publish-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
required: true
PUBLISH_DOCS_TOKEN:
required: true

jobs:
publish-release:
permissions:
Expand All @@ -25,22 +24,20 @@ 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: MetaMask/action-publish-release@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/cache@v3
- run: yarn --immutable
- run: yarn build
- name: Upload 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

publish-npm-dry-run:
needs: publish-release
Expand All @@ -55,17 +52,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 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
Expand All @@ -89,17 +79,10 @@ jobs:
node-version-file: '.nvmrc'
- name: Install Yarn
run: corepack enable
- name: Restore Yarn cache
uses: actions/setup-node@v4
- name: Restore 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:
Expand Down
Loading