💚 use xgo
This commit is contained in:
		
							parent
							
								
									8b78cae228
								
							
						
					
					
						commit
						3ceb286f2c
					
				
							
								
								
									
										24
									
								
								.github/workflows/dashboard.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										24
									
								
								.github/workflows/dashboard.yml
									
									
									
									
										vendored
									
									
								
							@ -25,17 +25,25 @@ jobs:
 | 
				
			|||||||
          fi
 | 
					          fi
 | 
				
			||||||
        id: extract_branch
 | 
					        id: extract_branch
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: xgoreleaser build
 | 
					      - name: Build
 | 
				
			||||||
        run: |
 | 
					        uses: crazy-max/ghaction-xgo@v2
 | 
				
			||||||
          docker pull --platform linux/amd64 oryd/xgoreleaser:latest
 | 
					        with:
 | 
				
			||||||
          docker run --mount type=bind,source="$(pwd)",target=/project \
 | 
					          xgo_version: latest
 | 
				
			||||||
              --platform linux/amd64 \
 | 
					          go_version: 1.18
 | 
				
			||||||
              -v /var/run/docker.sock:/var/run/docker.sock \
 | 
					          dest: build
 | 
				
			||||||
              --entrypoint goreleaser \
 | 
					          pkg: cmd/dashboard
 | 
				
			||||||
              oryd/xgoreleaser:latest --skip-publish --snapshot --rm-dist -f .goreleaser.dashboard.yml
 | 
					          prefix: dashboard
 | 
				
			||||||
 | 
					          targets: linux/amd64,linux/arm64,linux/arm,linux/386,linux/s390x
 | 
				
			||||||
 | 
					          v: true
 | 
				
			||||||
 | 
					          x: false
 | 
				
			||||||
 | 
					          race: false
 | 
				
			||||||
 | 
					          ldflags: -s -w
 | 
				
			||||||
 | 
					          buildmode: default
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      - name: move dist
 | 
					      - name: move dist
 | 
				
			||||||
        run: |
 | 
					        run: |
 | 
				
			||||||
 | 
					          ls -al dist
 | 
				
			||||||
 | 
					          tree dist
 | 
				
			||||||
          mkdir -p target/linux/{arm,arm64,386,amd64,s390x}
 | 
					          mkdir -p target/linux/{arm,arm64,386,amd64,s390x}
 | 
				
			||||||
          mkdir target/linux/arm/v7/
 | 
					          mkdir target/linux/arm/v7/
 | 
				
			||||||
          mv dist/universal_linux_arm_7/dashboard target/linux/arm/v7/dashboard
 | 
					          mv dist/universal_linux_arm_7/dashboard target/linux/arm/v7/dashboard
 | 
				
			||||||
 | 
				
			|||||||
@ -1,25 +0,0 @@
 | 
				
			|||||||
before:
 | 
					 | 
				
			||||||
  hooks:
 | 
					 | 
				
			||||||
    - go mod tidy -v
 | 
					 | 
				
			||||||
builds:
 | 
					 | 
				
			||||||
  - id: universal
 | 
					 | 
				
			||||||
    env:
 | 
					 | 
				
			||||||
      - CGO_ENABLED=1
 | 
					 | 
				
			||||||
    flags:
 | 
					 | 
				
			||||||
      - -tags
 | 
					 | 
				
			||||||
      - sqlite
 | 
					 | 
				
			||||||
    ldflags:
 | 
					 | 
				
			||||||
      - -s -w
 | 
					 | 
				
			||||||
    goos:
 | 
					 | 
				
			||||||
      - linux
 | 
					 | 
				
			||||||
    goarch:
 | 
					 | 
				
			||||||
      - arm
 | 
					 | 
				
			||||||
      - arm64
 | 
					 | 
				
			||||||
      - amd64
 | 
					 | 
				
			||||||
      - s390x
 | 
					 | 
				
			||||||
    goarm:
 | 
					 | 
				
			||||||
      - 7
 | 
					 | 
				
			||||||
    gomips:
 | 
					 | 
				
			||||||
      - softfloat
 | 
					 | 
				
			||||||
    main: ./cmd/dashboard
 | 
					 | 
				
			||||||
    binary: dashboard
 | 
					 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user