Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
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
6 changes: 4 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.openchain.xyz
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your-website-id
# NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.openchain.xyz
NEXT_PUBLIC_OPENCHAIN_API_URL=https://api.4byte.sourcify.dev
NEXT_PUBLIC_UMAMI_WEBSITE_ID=your-website-id
NEXT_PUBLIC_ENVIRONMENT=production
44 changes: 39 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -1,44 +1,78 @@
name: Release on Google Bucket

on:
push:
branches:
- main
- staging

jobs:
release:
runs-on: ubuntu-latest
environment: deploy
environment:
name: ${{ github.ref == 'refs/heads/main' && 'deploy' || 'staging' }}
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: "auth"

- name: "auth staging"
if: github.ref == 'refs/heads/staging'
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/1019539084286/locations/global/workloadIdentityPools/github/providers/sourcify"
service_account: "[email protected]"
service_account: "sourcify-4byte-staging-cd@sourcify-project.iam.gserviceaccount.com"

- name: "auth main"
if: github.ref == 'refs/heads/main'
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: "projects/1019539084286/locations/global/workloadIdentityPools/github/providers/sourcify"
service_account: "[email protected]"

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "22.4.0"

- name: Install dependencies
run: npm install

- name: Build
run: npm run build
env:
NEXT_PUBLIC_OPENCHAIN_API_URL: ${{ vars.NEXT_PUBLIC_OPENCHAIN_API_URL }}
NEXT_PUBLIC_UMAMI_WEBSITE_ID: ${{ vars.NEXT_PUBLIC_UMAMI_WEBSITE_ID }}

- name: "setup-gcloud"
uses: "google-github-actions/setup-gcloud@v2"

- name: Clear bucket
- name: Clear staging bucket
if: github.ref == 'refs/heads/staging'
run: |
# Clear the bucket
gsutil -m rm gs://4bytes-sourcify-staging/** || true

- name: Clear main bucket
if: github.ref == 'refs/heads/main'
run: |
# Clear the bucket
gsutil -m rm gs://4bytes-sourcify/** || true
- name: "upload-files"

- name: Upload files to staging bucket
if: github.ref == 'refs/heads/staging'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "out"
destination: "4bytes-sourcify-staging"
parent: false
glob: "**/*"

- name: Upload files to main bucket
if: github.ref == 'refs/heads/main'
uses: "google-github-actions/upload-cloud-storage@v2"
with:
path: "out"
Expand Down
106 changes: 102 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "4bytes.sourcify.dev",
"version": "0.1.0",
"name": "4byte.sourcify.dev",
"version": "1.0.0",
"private": true,
"scripts": {
"dev": "next dev --turbopack",
Expand All @@ -9,6 +9,7 @@
"lint": "eslint"
},
"dependencies": {
"ethers": "^6.15.0",
"next": "15.5.2",
"react": "19.1.0",
"react-dom": "19.1.0",
Expand Down
Loading
Loading