Skip to content

Commit 69becf0

Browse files
committed
Revert publish-release order
1 parent 2702bed commit 69becf0

2 files changed

Lines changed: 28 additions & 32 deletions

File tree

.github/workflows/create-release-pr.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ on:
44
workflow_dispatch:
55
inputs:
66
base-branch:
7-
description: "The base branch for git operations and the pull request."
8-
default: "main"
7+
description: 'The base branch for git operations and the pull request.'
8+
default: 'main'
99
required: true
1010
release-type:
1111
description: 'A SemVer version diff, i.e. major, minor, or patch. Mutually exclusive with "release-version".'
1212
required: false
1313
type: choice
1414
options:
15-
- ""
15+
- ''
1616
- major
1717
- minor
1818
- patch

.github/workflows/publish-release.yml

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,32 @@ on:
1010
PUBLISH_DOCS_TOKEN:
1111
required: true
1212
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+
1337
publish-npm-dry-run:
14-
name: Publish to NPM (dry run)
38+
needs: publish-release
1539
runs-on: ubuntu-latest
1640
steps:
1741
- name: Checkout and setup environment
@@ -33,7 +57,6 @@ jobs:
3357
SKIP_PREPACK: true
3458

3559
publish-npm:
36-
name: Publish to NPM
3760
needs: publish-npm-dry-run
3861
runs-on: ubuntu-latest
3962
environment: npm-publish
@@ -57,7 +80,6 @@ jobs:
5780
SKIP_PREPACK: true
5881

5982
get-release-version:
60-
name: Get release version
6183
needs: publish-npm
6284
runs-on: ubuntu-latest
6385
outputs:
@@ -91,29 +113,3 @@ jobs:
91113
destination_dir: latest
92114
secrets:
93115
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

Comments
 (0)