-
Notifications
You must be signed in to change notification settings - Fork 122
98 lines (78 loc) · 2.49 KB
/
build-dev.yaml
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
name: Build - Dev
on:
workflow_dispatch:
push:
tags:
- "!v*"
branches:
- master
pull_request:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
env:
BUILD_VERSION: latest # Computed
DOCKER_HUB_USER: defi
# Note: We do not use debug build on CI for dev as well, since debug builds
# take 5x the amount of space and run the GitHub CI workers out of space.
# make.sh still defaults to debug for local builds
MAKE_DEBUG: 0
GIT_VERSION: 1
jobs:
linux-x64:
runs-on: ubuntu-latest
env:
TARGET: x86_64-pc-linux-gnu
steps:
- uses: actions/checkout@v3
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Build and package
run: ./make.sh docker-release
- name: Publish artifact - x86_64-pc-linux-gnu
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-pc-linux-gnu.tar.gz
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ env.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: Push to Docker Hub
run: |
set -e; ver=${{ env.BUILD_VERSION }}
docker tag defichain-x86_64-pc-linux-gnu:${ver} defi/defichain:${ver}
docker push defi/defichain:${ver}
win-x64:
runs-on: ubuntu-latest
env:
TARGET: x86_64-w64-mingw32
steps:
- uses: actions/checkout@v3
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Build and package
run: ./make.sh docker-release
- name: Publish artifact - x86_64-w64-mingw32
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-w64-mingw32.tar.gz
osx-x64:
runs-on: ubuntu-latest
env:
TARGET: x86_64-apple-darwin
steps:
- uses: actions/checkout@v3
- name: Populate environment
run: ./make.sh ci-export-vars
- name: Build and package
run: ./make.sh docker-release
- name: Publish artifact - x86_64-apple-darwin
uses: actions/upload-artifact@v3
with:
name: defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin
path: ./build/defichain-${{ env.BUILD_VERSION }}-x86_64-apple-darwin.tar.gz