Update new Orbit deployment (#1589) #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: 'Release' | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- '.github/workflows/**' | |
workflow_dispatch: | |
jobs: | |
pre-ci: | |
runs-on: ubuntu-latest | |
timeout-minutes: 1 | |
steps: | |
- name: 'Block Concurrent Executions' | |
uses: softprops/turnstyle@v1 | |
with: | |
poll-interval-seconds: 10 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Build-Publish: | |
name: Build-Publish | |
needs: pre-ci | |
if: "!startsWith(github.event.head_commit.message, '[SKIP CI]') && startsWith(github.event.head_commit.message, '[RELEASE]') && github.repository == 'webb-tools/webb-dapp'" | |
runs-on: ubuntu-latest | |
steps: | |
#Check out | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 100 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
#Identify changes | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-hubble | |
with: | |
paths: apps/bridge-dapp | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-stats | |
with: | |
paths: apps/stats-dapp | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-faucet | |
with: | |
paths: apps/faucet | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-webbsite | |
with: | |
paths: apps/webbsite | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-tangle | |
with: | |
paths: apps/tangle-website | |
- uses: marceloprado/has-changed-path@v1 | |
id: changed-hubble-stats | |
with: | |
paths: apps/hubble-stats | |
- name: create env file for webbsite, tangle-site and faucet | |
run: | | |
touch .env | |
echo PRIVACY_POLICY_PAGE_ID=${{ secrets.PRIVACY_POLICY_PAGE_ID }} >> .env | |
echo TERMS_AND_CONDITIONS_PAGE_ID=${{ secrets.TERMS_AND_CONDITIONS_PAGE_ID }} >> .env | |
echo NOTION_TOKEN_V2=${{ secrets.NOTION_TOKEN_V2 }} >> .env | |
echo NOTION_ACTIVE_USER=${{ secrets.NOTION_ACTIVE_USER }} >> .env | |
echo NOTION_BLOG_INTEGRATION_POSTS_DATABASE_ID=${{ secrets.NOTION_BLOG_INTEGRATION_POSTS_DATABASE_ID }} >> .env | |
echo NOTION_BLOG_INTEGRATION_TOKEN=${{ secrets.NOTION_BLOG_INTEGRATION_TOKEN }} >> .env | |
echo NOTION_BLOG_INTEGRATION_VIDEOS_DATABASE_ID=${{ secrets.NOTION_BLOG_INTEGRATION_VIDEOS_DATABASE_ID }} >> .env | |
echo NEXT_PUBLIC_FAUCET_BACKEND_URL=${{ secrets.NEXT_PUBLIC_FAUCET_BACKEND_URL }} >> .env | |
echo NEXT_PUBLIC_TWITTER_CLIENT_ID=${{ secrets.NEXT_PUBLIC_TWITTER_CLIENT_ID }} >> .env | |
echo TWITTER_CLIENT_SECRET=${{ secrets.TWITTER_CLIENT_SECRET }} >> .env | |
touch .env | |
echo BRIDGE_DAPP_DOMAIN=${{ secrets.BRIDGE_DAPP_DOMAIN }} >> .env | |
echo BRIDGE_DAPP_WALLET_CONNECT_PROJECT_ID=${{ secrets.BRIDGE_DAPP_WALLET_CONNECT_PROJECT_ID }} >> .env | |
echo BRIDGE_DAPP_HOSTED_ORBIT_MULTLICALL3_ADDRESS=${{ secrets.BRIDGE_DAPP_HOSTED_ORBIT_MULTLICALL3_ADDRESS }} >> .env | |
echo BRIDGE_DAPP_ATHENA_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK=${{ secrets.BRIDGE_DAPP_ATHENA_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK }} >> .env | |
echo BRIDGE_DAPP_HERMES_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK=${{ secrets.BRIDGE_DAPP_HERMES_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK }} >> .env | |
echo BRIDGE_DAPP_DEMETER_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK=${{ secrets.BRIDGE_DAPP_DEMETER_ORBIT_MULTICALL3_DEPLOYMENT_BLOCK }} >> .env | |
- name: Install deps | |
run: yarn install | |
- name: build | |
# Fix: JavaScript heap out of memory | |
# https://github.com/actions/runner-images/issues/70#issuecomment-1191708172 | |
env: | |
NODE_OPTIONS: '--max_old_space_size=4096' | |
run: yarn nx run-many --all --target=build | |
# Create github release | |
- name: Release hubble | |
if: steps.changed-hubble.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/bridge-dapp | |
repo-token: ${{ secrets.REPO_TOKEN }} | |
- name: Release stats | |
if: steps.changed-stats.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/stats-dapp | |
repo-token: ${{ secrets.REPO_TOKEN }} | |
- name: Release faucet | |
if: steps.changed-faucet.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/faucet | |
repo-token: ${{ secrets.REPO_TOKEN }} | |
- name: Release webbsite | |
if: steps.changed-webbsite.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/webbsite | |
repo-token: ${{ secrets.REPO_TOKEN }} | |
- name: Release tangle | |
if: steps.changed-tangle.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/tangle-website | |
repo-token: ${{ secrets.REPO_TOKEN }} | |
- name: Release hubble stats | |
if: steps.changed-hubble-stats.outputs.changed == 'true' | |
uses: ./.github/actions/create-release | |
with: | |
package-path: apps/hubble-stats | |
repo-token: ${{ secrets.REPO_TOKEN }} |