-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (135 loc) · 4.7 KB
/
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
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
name: Development workflow
on:
push:
branches:
- dev
- feature/*
- release/*
env:
SLACK_CHANNEL: weos
SLACK_USERNAME: WeOS API
SLACK_ICON: https://github.com/wepala.png?size=48
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_FOOTER: copyright 2022 Wepala
OAUTH_TEST_KEY: ${{ secrets.OAUTH_TEST_KEY }}
jobs:
build-api:
name: Release Go Binaries
outputs:
today: ${{ steps.date.outputs.today }}
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: 1.16.x
- name: Run unit tests
run: go test -v ./...
- name: Run Postgres end to end tests
run: go test -v -driver=postgres
# - name: Run MySQL end to end tests
# run: go test -v -driver=mysql
- name: Run Postgres projections tests
run: go test -v ./projections -driver=postgres
# - name: Run Mysql projections tests
# run: go test -v ./projections -driver=mysql
# - uses: crazy-max/ghaction-xgo@v1
# name: build linux and mac
# with:
# xgo_version: latest
# go_version: 1.16.x
# dest: .
# prefix: weos
# targets: linux/386,linux/amd64,darwin/amd64,windows/386,windows/amd64
# v: true
# x: false
# race: false
# ldflags: -s -w
# buildmode: default
# - name: setup app
# run: |
# #setup go tests
# go install github.com/cucumber/godog/cmd/godog@latest
# godog -t long
#
# #setup mac build
# mkdir -p build/mac
# cp api.yaml build/mac/api.yaml
# cp README.md build/mac/README.md
# cp LICENSE build/mac/LICENSE
# cp NOTICE.txt build/mac/NOTICE.txt
# cp weos-darwin-10.16-amd64 build/mac/weos
# chmod +x build/mac/weos
# tar -czf weos-mac-amd64.tar.gz -C build/mac .
#
# #setup linux 32 bit build
# mkdir -p build/linux32/apps/admin
# cp api.yaml build/linux32/api.yaml
# cp README.md build/linux32/README.md
# cp LICENSE build/linux32/LICENSE
# cp NOTICE.txt build/linux32/NOTICE.txt
# cp weos-linux-386 build/linux32/weos
# chmod +x build/linux32/weos
# tar -czf weos-linux-386.tar.gz -C build/linux32 .
#
# #setup linux 64 bit build
# mkdir -p build/linux64/apps/admin
# cp api.yaml build/linux64/api.yaml
# cp README.md build/linux64/README.md
# cp LICENSE build/linux64/LICENSE
# cp NOTICE.txt build/linux64/NOTICE.txt
# cp weos-linux-amd64 build/linux64/weos
# chmod +x build/linux64/weos
# tar -czf weos-linux-amd64.tar.gz -C build/linux64 .
#
# #setup windows 32 bit build
# mkdir -p build/win32/apps/admin
# cp api.yaml build/win32/api.yaml
# cp README.md build/win32/README.md
# cp LICENSE build/win32/LICENSE
# cp NOTICE.txt build/win32/NOTICE.txt
# cp weos-windows-4.0-386.exe build/win32/weos.exe
# chmod +x build/win32/weos.exe
# cd build/win32
# zip -r ../../weos-win32.zip .
# cd ../../
#
# #setup windows 64 bit build
# mkdir -p build/win64/apps/admin
# cp api.yaml build/win64/api.yaml
# cp README.md build/win64/README.md
# cp LICENSE build/win64/LICENSE
# cp NOTICE.txt build/win64/NOTICE.txt
# cp weos-windows-4.0-amd64.exe build/win64/weos.exe
# chmod +x build/win64/weos.exe
# cd build/win64
# zip -r ../../weos-win64.zip .
#
# - uses: actions/upload-artifact@v2
# with:
# name: Mac OS
# path: weos-mac-amd64.tar.gz
# - uses: actions/upload-artifact@v2
# with:
# name: Linux 32 Bit
# path: weos-linux-386.tar.gz
# - uses: actions/upload-artifact@v2
# with:
# name: Linux 64 Bit
# path: weos-linux-amd64.tar.gz
# - uses: actions/upload-artifact@v2
# with:
# name: Windows 32 Bit
# path: weos-win32.zip
# - uses: actions/upload-artifact@v2
# with:
# name: Windows 64 bit
# path: weos-win64.zip
- name: Send release notification
uses: rtCamp/action-slack-notify@v2
env:
SLACK_COLOR: "FFFF00"
SLACK_MESSAGE: We were able to create a development build. Get the artifact here https://github.com/wepala/weos/actions/runs/${{ github.run_id }}
SLACK_TITLE: WeOS Build Created