forked from Jamesits/SND
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yaml
55 lines (47 loc) · 1.34 KB
/
azure-pipelines.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
name: $(SourceBranchName)-$(Date:yyyyMMdd).$(Rev:r)
variables:
GOVER: '1.20.3'
GOPATH: '/tmp/go'
trigger:
batch: true
branches:
include: [ "master", "develop" ]
paths:
exclude: [ "README.md", "LICENSE", ".github/*", "contrib/config/*", ".golangci.yml" ]
pr:
autoCancel: true
branches:
include: [ "master", "develop" ]
paths:
exclude: [ "README.md", "LICENSE", ".github/*", "contrib/config/*", ".golangci.yml" ]
jobs:
- job: binary
displayName: "binary build"
pool:
vmImage: "ubuntu-latest"
workspace:
clean: all
timeoutInMinutes: 15
steps:
- task: GoTool@0
displayName: 'Use Go'
inputs:
version: $(GOVER)
- bash: |
export DEBIAN_FRONTEND=noninteractive
sudo apt-get update
sudo apt-get install -y upx libcap2-bin
displayName: 'Install Dependencies'
- task: goreleaser@0
inputs:
version: 'latest'
distribution: 'goreleaser'
args: 'build --config contrib/goreleaser/goreleaser.yaml --snapshot --clean'
workdir: '$(Build.SourcesDirectory)'
- bash: |
cp -rv dist/* ${BUILD_ARTIFACTSTAGINGDIRECTORY}
displayName: 'Copy Artifact'
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
ArtifactName: 'snd'