4
4
workflow_dispatch :
5
5
inputs :
6
6
version :
7
- description : ' Version'
7
+ description : ' Version'
8
8
required : true
9
9
jobs :
10
10
build :
11
11
name : Build
12
12
runs-on : ubuntu-latest
13
- if : github.ref == 'refs/heads/master'
13
+ if : ${{ ( github.ref == 'refs/heads/master') || endsWith(github.event.inputs.version, 'SNAPSHOT') }}
14
14
steps :
15
15
16
16
- name : Set up Go 1.x
@@ -36,10 +36,10 @@ jobs:
36
36
- name : Build Linux 64
37
37
run : go build -mod=vendor -a -ldflags "-X main.JECCommitVersion=$GITHUB_SHA -X main.JECVersion=${{ github.event.inputs.version }}" -o ../.release/jec-packages-linux/JiraEdgeConnector main.go
38
38
working-directory : main
39
- if : success()
39
+ if : success()
40
40
env :
41
- CGO_ENABLED : 0
42
- GOOS : linux
41
+ CGO_ENABLED : 0
42
+ GOOS : linux
43
43
GOARCH : amd64
44
44
GO111MODULE : on
45
45
@@ -51,23 +51,23 @@ jobs:
51
51
- name : Build Win 32 Service
52
52
run : go build -mod=vendor -o ../../.release/jec-packages-win32/jecService32.exe jecService.go
53
53
working-directory : windows_service/main
54
- if : success()
54
+ if : success()
55
55
env :
56
- CGO_ENABLED : 0
57
- GOOS : windows
56
+ CGO_ENABLED : 0
57
+ GOOS : windows
58
58
GOARCH : 386
59
59
GO111MODULE : on
60
-
60
+
61
61
- name : Build Win 32
62
62
run : go build -mod=vendor -a -ldflags "-X main.JECCommitVersion=$GITHUB_SHA -X main.JECVersion=${{ github.event.inputs.version }}" -o ../.release/jec-packages-win32/JiraEdgeConnector32.exe main.go
63
63
working-directory : main
64
- if : success()
64
+ if : success()
65
65
env :
66
- CGO_ENABLED : 0
67
- GOOS : windows
66
+ CGO_ENABLED : 0
67
+ GOOS : windows
68
68
GOARCH : 386
69
69
GO111MODULE : on
70
-
70
+
71
71
-
uses :
montudor/[email protected]
72
72
name : Compressing Windows 32 Package
73
73
with :
@@ -76,23 +76,23 @@ jobs:
76
76
- name : Build Win 64 Service
77
77
run : go build -mod=vendor -o ../../.release/jec-packages-win64/jecService64.exe jecService.go
78
78
working-directory : windows_service/main
79
- if : success()
79
+ if : success()
80
80
env :
81
- CGO_ENABLED : 0
82
- GOOS : windows
81
+ CGO_ENABLED : 0
82
+ GOOS : windows
83
83
GOARCH : amd64
84
84
GO111MODULE : on
85
-
85
+
86
86
- name : Build Win 64
87
87
run : go build -mod=vendor -a -ldflags "-X main.JECCommitVersion=$GITHUB_SHA -X main.JECVersion=${{ github.event.inputs.version }}" -o ../.release/jec-packages-win64/JiraEdgeConnector64.exe main.go
88
88
working-directory : main
89
- if : success()
89
+ if : success()
90
90
env :
91
- CGO_ENABLED : 0
92
- GOOS : windows
91
+ CGO_ENABLED : 0
92
+ GOOS : windows
93
93
GOARCH : amd64
94
94
GO111MODULE : on
95
-
95
+
96
96
-
uses :
montudor/[email protected]
97
97
name : Compressing Windows 64 Package
98
98
with :
@@ -108,7 +108,7 @@ jobs:
108
108
release_name : Release ${{ github.event.inputs.version }}
109
109
draft : true
110
110
111
- - name : Upload Linux 64 bit Release
111
+ - name : Upload Linux 64 bit Release
112
112
uses : actions/upload-release-asset@v1
113
113
env :
114
114
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -118,7 +118,7 @@ jobs:
118
118
asset_name : jec-linux-amd64-${{ github.event.inputs.version }}.zip
119
119
asset_content_type : application/zip
120
120
121
- - name : Upload Win 32 bit Release
121
+ - name : Upload Win 32 bit Release
122
122
uses : actions/upload-release-asset@v1
123
123
env :
124
124
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -128,7 +128,7 @@ jobs:
128
128
asset_name : jec-win-386-${{ github.event.inputs.version }}.zip
129
129
asset_content_type : application/zip
130
130
131
- - name : Upload Win 64 bit Release
131
+ - name : Upload Win 64 bit Release
132
132
uses : actions/upload-release-asset@v1
133
133
env :
134
134
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -137,8 +137,8 @@ jobs:
137
137
asset_path : .release/jec-win-amd64-${{ github.event.inputs.version }}.zip
138
138
asset_name : jec-win-amd64-${{ github.event.inputs.version }}.zip
139
139
asset_content_type : application/zip
140
-
141
- - name : Upload Artifacts
140
+
141
+ - name : Upload Artifacts
142
142
uses : actions/upload-artifact@v2
143
143
with :
144
144
name : Release Artifacts
0 commit comments