Skip to content

Commit d39826e

Browse files
authored
Merge pull request #1 from sourcifyeth/staging
Release
2 parents be9f9fa + 16aa37c commit d39826e

File tree

9 files changed

+782
-136
lines changed

9 files changed

+782
-136
lines changed

.env.example

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.openchain.xyz
2-
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your-website-id
1+
# NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.openchain.xyz
2+
NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.4byte.sourcify.dev
3+
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your-website-id
4+
NEXT_PUBLIC_ENVIRONMENT=production

.github/workflows/release.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,78 @@
11
name: Release on Google Bucket
2+
23
on:
34
push:
45
branches:
56
- main
7+
- staging
8+
69
jobs:
710
release:
811
runs-on: ubuntu-latest
9-
environment: deploy
12+
environment:
13+
name: ${{ github.ref == 'refs/heads/main' && 'deploy' || 'staging' }}
1014
permissions:
1115
contents: read
1216
packages: write
1317
id-token: write
1418
steps:
1519
- name: Checkout repository
1620
uses: actions/checkout@v4
17-
- name: "auth"
21+
22+
- name: "auth staging"
23+
if: github.ref == 'refs/heads/staging'
1824
uses: "google-github-actions/auth@v2"
1925
with:
2026
workload_identity_provider: "projects/1019539084286/locations/global/workloadIdentityPools/github/providers/sourcify"
21-
service_account: "[email protected]"
27+
service_account: "sourcify-4byte-staging-cd@sourcify-project.iam.gserviceaccount.com"
28+
29+
- name: "auth main"
30+
if: github.ref == 'refs/heads/main'
31+
uses: "google-github-actions/auth@v2"
32+
with:
33+
workload_identity_provider: "projects/1019539084286/locations/global/workloadIdentityPools/github/providers/sourcify"
34+
service_account: "[email protected]"
35+
2236
- name: Set up Node.js
2337
uses: actions/setup-node@v3
2438
with:
2539
node-version: "22.4.0"
40+
2641
- name: Install dependencies
2742
run: npm install
43+
2844
- name: Build
2945
run: npm run build
3046
env:
3147
NEXT_PUBLIC_OPENCHAIN_API_URL: ${{ vars.NEXT_PUBLIC_OPENCHAIN_API_URL }}
3248
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${{ vars.NEXT_PUBLIC_UMAMI_WEBSITE_ID }}
49+
3350
- name: "setup-gcloud"
3451
uses: "google-github-actions/setup-gcloud@v2"
3552

36-
- name: Clear bucket
53+
- name: Clear staging bucket
3754
if: github.ref == 'refs/heads/staging'
55+
run: |
56+
# Clear the bucket
57+
gsutil -m rm gs://4bytes-sourcify-staging/** || true
58+
59+
- name: Clear main bucket
60+
if: github.ref == 'refs/heads/main'
3861
run: |
3962
# Clear the bucket
4063
gsutil -m rm gs://4bytes-sourcify/** || true
41-
- name: "upload-files"
64+
65+
- name: Upload files to staging bucket
66+
if: github.ref == 'refs/heads/staging'
67+
uses: "google-github-actions/upload-cloud-storage@v2"
68+
with:
69+
path: "out"
70+
destination: "4bytes-sourcify-staging"
71+
parent: false
72+
glob: "**/*"
73+
74+
- name: Upload files to main bucket
75+
if: github.ref == 'refs/heads/main'
4276
uses: "google-github-actions/upload-cloud-storage@v2"
4377
with:
4478
path: "out"

package-lock.json

Lines changed: 102 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "4bytes.sourcify.dev",
3-
"version": "0.1.0",
2+
"name": "4byte.sourcify.dev",
3+
"version": "1.0.0",
44
"private": true,
55
"scripts": {
66
"dev": "next dev --turbopack",
@@ -9,6 +9,7 @@
99
"lint": "eslint"
1010
},
1111
"dependencies": {
12+
"ethers": "^6.15.0",
1213
"next": "15.5.2",
1314
"react": "19.1.0",
1415
"react-dom": "19.1.0",

0 commit comments

Comments
 (0)