7
7
branches-ignore :
8
8
- ' **'
9
9
10
+
10
11
env :
11
12
DOCKER_HUB_REPO : docker.io/slashdevops
12
13
13
14
jobs :
14
15
15
- build_test_publish :
16
- name : Build Test and Publish Release
16
+ test :
17
+ name : Test
18
+ runs-on : ubuntu-latest
19
+ steps :
20
+ - name : Set up Go 1.x
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : ^1.14
24
+ id : go
25
+
26
+ - name : Check out code into the Go module directory
27
+ uses : actions/checkout@v2
28
+
29
+ - name : Install promu
30
+ run : make promu
31
+
32
+ - name : Build and Test Linux Platform Only
33
+ run : make
34
+
35
+ - name : Check code modifications
36
+ run : git diff --exit-code
37
+
38
+ build :
39
+ name : Build
40
+ needs : test
17
41
runs-on : ubuntu-latest
18
42
steps :
19
43
- name : Set up Go 1.x
@@ -31,27 +55,126 @@ jobs:
31
55
- name : Build Cross-Platform
32
56
run : promu crossbuild -v
33
57
58
+ - name : List Workspace Files
59
+ run : ls -la .
60
+
61
+ - name : List .build Files
62
+ run : ls -R .build
63
+
64
+ - name : Upload .build artifacts
65
+ uses : actions/upload-artifact@v1
66
+ with :
67
+ name : .build
68
+ path : .build
69
+
70
+ publish_docker_images :
71
+ name : Publish Docker Images
72
+ needs : build
73
+ runs-on : ubuntu-latest
74
+ steps :
75
+ - name : Set up Go 1.x
76
+ uses : actions/setup-go@v2
77
+ with :
78
+ go-version : ^1.14
79
+ id : go
80
+
81
+ - name : Check out code into the Go module directory
82
+ uses : actions/checkout@v2
83
+
84
+ - name : Install promu
85
+ run : make promu
86
+
87
+ - name : Show Package Information
88
+ run : promu info
89
+
90
+ - name : Docker Version
91
+ run : docker version
92
+
93
+ - name : Download .build artifacts from Build Step
94
+ uses : actions/download-artifact@v1
95
+ with :
96
+ name : .build
97
+ path : .build
98
+
99
+ - name : List Workspace Files
100
+ run : ls -la .
101
+
102
+ - name : List .build Files
103
+ run : ls -R .build
104
+
34
105
- name : Build Docker Images
35
106
run : make docker DOCKER_REPO=docker.io/slashdevops
36
107
37
108
- name : Docker Tag Images Latest
38
109
run : make docker-tag-latest DOCKER_REPO=docker.io/slashdevops
39
110
40
- - name : Show Docker Images
111
+ - name : Show Local Docker Images
41
112
run : docker images
42
113
43
114
- name : Loging in Docker Hub
44
115
run : echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
45
116
46
- - name : Publish images in Docker Hub
117
+ - name : Publish Images in Docker Hub
47
118
run : make docker-publish DOCKER_REPO=$DOCKER_HUB_REPO
48
119
49
- - name : Publish manifest in Docker Hub
120
+ - name : Publish Manifest in Docker Hub
50
121
run : make docker-manifest DOCKER_REPO=$DOCKER_HUB_REPO
51
122
123
+ create_release :
124
+ name : Create Release
125
+ needs : build
126
+ runs-on : ubuntu-latest
127
+ steps :
128
+ - name : Checkout code
129
+ uses : actions/checkout@v2
130
+
131
+ - name : Create Release
132
+ id : create_release
133
+ uses : actions/create-release@v1
134
+ env :
135
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
136
+ with :
137
+ tag_name : ${{ github.ref }}
138
+ release_name : Release ${{ github.ref }}
139
+ body : |
140
+ [WIP] Changes in this Release
141
+ - First Change
142
+ - Second Change
143
+ draft : false
144
+ prerelease : false
145
+
146
+ publish_tarballs :
147
+ name : Publish Tarballs
148
+ needs : create_release
149
+ runs-on : ubuntu-latest
150
+ steps :
151
+ - name : Set up Go 1.x
152
+ uses : actions/setup-go@v2
153
+ with :
154
+ go-version : ^1.14
155
+ id : go
156
+
157
+ - name : Check out code into the Go module directory
158
+ uses : actions/checkout@v2
159
+
160
+ - name : Install promu
161
+ run : make promu
162
+
52
163
- name : Show Package Information
53
164
run : promu info
54
165
166
+ - name : Download .build artifacts from Build Step
167
+ uses : actions/download-artifact@v1
168
+ with :
169
+ name : .build
170
+ path : .build
171
+
172
+ - name : List Workspace Files
173
+ run : ls -la .
174
+
175
+ - name : List .build Files
176
+ run : ls -R .build
177
+
55
178
- name : Build Tarballs Files
56
179
run : promu crossbuild tarballs
57
180
61
184
- name : Release Tarballs Files
62
185
run : promu release -v .tarballs
63
186
env :
64
- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
187
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65
188
66
- - name : Upload artifacts to Github
189
+ - name : Upload Artifacts to Github
67
190
uses : actions/upload-artifact@v1
68
191
with :
69
192
name : releases
0 commit comments