Skip to content

Commit 7a667b3

Browse files
committed
Update release.yml to support multi-network builds
1 parent 67fe99a commit 7a667b3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

.github/workflows/release.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ jobs:
5555
name: Build Next.js App
5656
runs-on: ubuntu-latest
5757
needs: [install-dependencies, generate-version]
58+
strategy:
59+
matrix:
60+
network: [devnet, testnet, mainnet]
5861
steps:
5962
- name: Checkout repository
6063
uses: actions/checkout@v4
@@ -66,8 +69,8 @@ jobs:
6669
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
6770
restore-keys: npm-${{ runner.os }}-
6871

69-
- name: Build Next.js App
70-
run: npm run build
72+
- name: Build Next.js App app for ${{ matrix.network }}
73+
run: npm run build:${{ matrix.network }}
7174
env:
7275
NODE_ENV: production
7376
MORALIS_API_KEY: ${{ secrets.MORALIS_API_KEY }}
@@ -80,13 +83,13 @@ jobs:
8083
cp -r public .next/standalone/public
8184
8285
- name: Archive standalone build
83-
run: zip -r ratio1-explorer.zip .next/standalone
86+
run: zip -r ratio1-explorer-${{ matrix.network }}.zip .next/standalone
8487

8588
- name: Upload Build as Artifact
8689
uses: actions/upload-artifact@v4
8790
with:
88-
name: ratio1-explorer
89-
path: ratio1-explorer.zip
91+
name: ratio1-explorer-${{ matrix.network }}
92+
path: ratio1-explorer-${{ matrix.network }}.zip
9093

9194
release:
9295
name: Create GitHub Release
@@ -96,10 +99,9 @@ jobs:
9699
- name: Checkout repository
97100
uses: actions/checkout@v4
98101

99-
- name: Download Artifact
102+
- name: Download All Artifacts
100103
uses: actions/download-artifact@v4
101104
with:
102-
name: ratio1-explorer
103105
path: builds
104106

105107
- name: List downloaded files
@@ -112,6 +114,6 @@ jobs:
112114
name: v${{ needs.generate-version.outputs.version }}
113115
draft: false
114116
prerelease: false
115-
files: builds/ratio1-explorer.zip
117+
files: builds/**/*
116118
env:
117119
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)