-
Notifications
You must be signed in to change notification settings - Fork 15
142 lines (123 loc) · 5.15 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
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 }}