-
Notifications
You must be signed in to change notification settings - Fork 83
86 lines (74 loc) · 2.38 KB
/
build-workflow.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
name: Build & Push to IPFS
on: push
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Build Note for ${{ github.ref }}
run: |
echo Building ${GITHUB_REF}...
- name: Checkout repository
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Cache Node Modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
# yarn cache files are stored in `~/.cache` on Linux/macOS
path: ~/.cache
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Cache Elm Stuff
uses: actions/cache@v2
env:
cache-name: cache-elm-stuff
with:
path: elm-stuff
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/elm.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Install Yarn Dependencies
run: |
yarn install --ignore-optional --ignore-platform || ( \
echo "Yarn install failed, cleaning cache" && \
yarn cache clean && \
echo "Trying yarn install again..." \
&& yarn install --ignore-optional --ignore-platform
)
- name: Build Translations
run: |
yarn i18n
- name: Build CSS
run: |
yarn build-css
- name: Build JavaScript
run: yarn build
env:
DATA_PROVIDERS: ${{ secrets.DATA_PROVIDERS }}
WALLET_CONNECT_PROJECT_ID: ${{ secrets.WALLET_CONNECT_PROJECT_ID }}
- name: Archive App
uses: actions/upload-artifact@v1
with:
name: build
path: build
- name: Deploy to IPFS
run: |
yarn --silent deploy-ipfs | tee .release-notes
env:
IPFS_AUTH: ${{ secrets.IPFS_AUTH }}
IPFS_HOST: ${{ secrets.IPFS_HOST }}
- name: Upload IPFS Release Artifact
uses: actions/upload-artifact@v1
with:
name: .release
path: .release