Skip to content

Commit 481f045

Browse files
authored
ci: Publish release to GitHub after NPM (#308)
* Publish release to GitHub after NPM * Revert checkout and setup change
1 parent 4ec2a82 commit 481f045

1 file changed

Lines changed: 24 additions & 8 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,17 @@ on:
1010
PUBLISH_DOCS_TOKEN:
1111
required: true
1212
jobs:
13-
publish-release:
14-
permissions:
15-
contents: write
13+
build:
14+
name: Build
1615
runs-on: ubuntu-latest
1716
steps:
1817
- name: Checkout and setup environment
1918
uses: MetaMask/action-checkout-and-setup@v3
2019
with:
2120
is-high-risk-environment: true
2221
ref: ${{ github.sha }}
23-
- uses: MetaMask/action-publish-release@v3
24-
env:
25-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26-
- run: yarn build
22+
- name: Build
23+
run: yarn build
2724
- name: Upload build artifacts
2825
uses: actions/upload-artifact@v7
2926
with:
@@ -35,7 +32,8 @@ jobs:
3532
./node_modules/.yarn-state.yml
3633
3734
publish-npm-dry-run:
38-
needs: publish-release
35+
name: Publish to NPM (dry run)
36+
needs: build
3937
runs-on: ubuntu-latest
4038
steps:
4139
- name: Checkout and setup environment
@@ -57,6 +55,7 @@ jobs:
5755
SKIP_PREPACK: true
5856

5957
publish-npm:
58+
name: Publish to NPM
6059
needs: publish-npm-dry-run
6160
runs-on: ubuntu-latest
6261
environment: npm-publish
@@ -80,6 +79,7 @@ jobs:
8079
SKIP_PREPACK: true
8180

8281
get-release-version:
82+
name: Get release version
8383
needs: publish-npm
8484
runs-on: ubuntu-latest
8585
outputs:
@@ -113,3 +113,19 @@ jobs:
113113
destination_dir: latest
114114
secrets:
115115
PUBLISH_DOCS_TOKEN: ${{ secrets.PUBLISH_DOCS_TOKEN }}
116+
117+
publish-release:
118+
name: Publish to GitHub
119+
needs: publish-npm
120+
permissions:
121+
contents: write
122+
runs-on: ubuntu-latest
123+
steps:
124+
- name: Checkout and setup environment
125+
uses: MetaMask/action-checkout-and-setup@v3
126+
with:
127+
is-high-risk-environment: true
128+
ref: ${{ github.sha }}
129+
- uses: MetaMask/action-publish-release@v3
130+
env:
131+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)