77 branches-ignore :
88 - ' **'
99
10+
1011env :
1112 DOCKER_HUB_REPO : docker.io/slashdevops
1213
1314jobs :
1415
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
1741 runs-on : ubuntu-latest
1842 steps :
1943 - name : Set up Go 1.x
@@ -31,27 +55,126 @@ jobs:
3155 - name : Build Cross-Platform
3256 run : promu crossbuild -v
3357
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+
34105 - name : Build Docker Images
35106 run : make docker DOCKER_REPO=docker.io/slashdevops
36107
37108 - name : Docker Tag Images Latest
38109 run : make docker-tag-latest DOCKER_REPO=docker.io/slashdevops
39110
40- - name : Show Docker Images
111+ - name : Show Local Docker Images
41112 run : docker images
42113
43114 - name : Loging in Docker Hub
44115 run : echo ${{ secrets.DOCKER_HUB_PASSWORD }} | docker login -u ${{ secrets.DOCKER_HUB_USER }} --password-stdin
45116
46- - name : Publish images in Docker Hub
117+ - name : Publish Images in Docker Hub
47118 run : make docker-publish DOCKER_REPO=$DOCKER_HUB_REPO
48119
49- - name : Publish manifest in Docker Hub
120+ - name : Publish Manifest in Docker Hub
50121 run : make docker-manifest DOCKER_REPO=$DOCKER_HUB_REPO
51122
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+
52163 - name : Show Package Information
53164 run : promu info
54165
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+
55178 - name : Build Tarballs Files
56179 run : promu crossbuild tarballs
57180
61184 - name : Release Tarballs Files
62185 run : promu release -v .tarballs
63186 env :
64- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
187+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
65188
66- - name : Upload artifacts to Github
189+ - name : Upload Artifacts to Github
67190 uses : actions/upload-artifact@v1
68191 with :
69192 name : releases
0 commit comments