-
Notifications
You must be signed in to change notification settings - Fork 319
59 lines (48 loc) · 1.51 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
name: Release SDK & UI
env:
CI: true
FORCE_COLOR: true
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
env:
# Workaround for https://github.com/actions/setup-node/issues/317
FORCE_COLOR: 0
- run: yarn install --immutable
- run: yarn build
- name: Test SDK & UI
run: yarn test
- name: Test SDK integration against live contracts
if: ${{ github.ref == 'refs/heads/master' }}
run: yarn test-live
- name: Release SDK on NPM
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: yarn release
- name: Login to Docker Hub
uses: azure/docker-login@v1
if: ${{ github.event_name == 'push' }}
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_ACCESS_TOKEN }}
- name: Release dev-frontend on Docker Hub
if: ${{ github.event_name == 'push' }}
run: |
docker-compose build
docker-compose push
working-directory: ./packages/dev-frontend
env:
TAG: ${{ fromJSON('{ "refs/heads/master":"latest", "refs/heads/main":"next" }')[github.ref] }}