File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Release Pipeline
2+
3+ on :
4+ workflow_dispatch :
5+ release :
6+ types : [ published ]
7+
8+ jobs :
9+
10+
11+ tests :
12+ name : Unit Tests
13+ runs-on : ubuntu-latest
14+ steps :
15+ - name : Clone Code
16+ uses : actions/checkout@v3
17+
18+ - name : Set up Go
19+ uses : actions/setup-go@v3
20+ with :
21+ go-version : 1.18
22+
23+ - name : Run Unit Tests
24+ run : make test -B
25+
26+ # ------------------------------------------------------------------------------------------------------------------------
27+
28+ build :
29+ name : Build Binaries
30+ needs : [ tests ]
31+ runs-on : ubuntu-latest
32+ steps :
33+ - name : Clone Code
34+ uses : actions/checkout@v3
35+
36+ - name : Set up Go
37+ uses : actions/setup-go@v3
38+ with :
39+ go-version : 1.18
40+
41+ - name : Mount Cache
42+ uses : actions/cache@v3
43+ with :
44+ key : cache-build-${{ github.run_id }}
45+ path : |
46+ build
47+
48+ - name : Build Binaries
49+ run : make build -B
50+
51+ # ------------------------------------------------------------------------------------------------------------------------
52+
53+ deploy :
54+ name : Deployment
55+ runs-on : ubuntu-latest
56+ needs : [ build ]
57+ steps :
58+
59+ - uses : actions/checkout@v3
60+
61+ - name : Mount Cache
62+ uses : actions/cache@v3
63+ with :
64+ key : cache-build-${{ github.run_id }}
65+ path : |
66+ build
67+
68+ - name : Deployment to Server
69+ uses : bayssmekanique/action-simple-file-upload@v1
70+ with :
71+ host : ${{ secrets.SSH_PROD_HOST }}
72+ user : ${{ secrets.SSH_PROD_USER }}
73+ password : ${{ secrets.SSH_PROD_PWD }}
74+ src : ./build/
75+ dest : ${{ secrets.PROD_DOWNLOAD_DIR }}/
You can’t perform that action at this time.
0 commit comments