add cicd pipeline for build and release
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build encountered an error
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build encountered an error
				
			This commit is contained in:
		
							
								
								
									
										64
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										64
									
								
								.drone.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,64 @@
 | 
			
		||||
kind: pipeline
 | 
			
		||||
name: default
 | 
			
		||||
 | 
			
		||||
workspace:
 | 
			
		||||
  base: /go
 | 
			
		||||
  path: src/deadbeef.codes/steven/hyp
 | 
			
		||||
 | 
			
		||||
steps:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
- name: build csv2xls linux-amd64
 | 
			
		||||
  image: golang
 | 
			
		||||
  pull: always
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: publicrelease
 | 
			
		||||
    path: /dist
 | 
			
		||||
  environment:
 | 
			
		||||
    GOOS: linux
 | 
			
		||||
    GOARCH: amd64
 | 
			
		||||
    CGO_ENABLED: 0
 | 
			
		||||
  commands:
 | 
			
		||||
  - go version
 | 
			
		||||
  - go get
 | 
			
		||||
  - mkdir /dist -p
 | 
			
		||||
  - go build -a -ldflags '-w' -o /dist/csv2xls-linux-amd64 .
 | 
			
		||||
  - cp csv2xls
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
- name: build csv2xls windows-amd64
 | 
			
		||||
  image: golang
 | 
			
		||||
  pull: always
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: publicrelease
 | 
			
		||||
    path: /dist
 | 
			
		||||
  environment:
 | 
			
		||||
    GOOS: windows
 | 
			
		||||
    GOARCH: amd64
 | 
			
		||||
    CGO_ENABLED: 0
 | 
			
		||||
  commands:
 | 
			
		||||
  - go version
 | 
			
		||||
  - go get
 | 
			
		||||
  - go build -a -ldflags '-w' -o /dist/csv2xls-windows-amd64.exe .
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
- name: release
 | 
			
		||||
  image: plugins/gitea-release
 | 
			
		||||
  pull: always
 | 
			
		||||
  volumes:
 | 
			
		||||
  - name: publicrelease
 | 
			
		||||
    path: /dist
 | 
			
		||||
  settings:
 | 
			
		||||
    api_key: 
 | 
			
		||||
      from_secret: drone_token
 | 
			
		||||
    base_url: https://code.stevenpolley.net
 | 
			
		||||
    files: /dist/*
 | 
			
		||||
  when:
 | 
			
		||||
    event:
 | 
			
		||||
    - tag
 | 
			
		||||
 | 
			
		||||
volumes:
 | 
			
		||||
- name: publicrelease
 | 
			
		||||
  host:
 | 
			
		||||
    path: /data/public/build/csv2xls
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user