35 lines
		
	
	
		
			656 B
		
	
	
	
		
			YAML
		
	
	
	
			
		
		
	
	
			35 lines
		
	
	
		
			656 B
		
	
	
	
		
			YAML
		
	
	
	
| name: GoReleaser
 | |
| 
 | |
| on:
 | |
|   push:
 | |
|     tags:
 | |
|       - 'v0*'
 | |
|       - 'v1*'
 | |
|     branches:
 | |
|       - 'main'
 | |
|   pull_request:
 | |
|     branches:
 | |
|       - 'main'
 | |
| 
 | |
| permissions:
 | |
|   contents: write
 | |
| 
 | |
| env:
 | |
|   GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
 | |
|   SNAPSHOT: ${{ !startsWith(github.ref, 'refs/tags/v') && '--snapshot' || '' }}
 | |
| 
 | |
| jobs:
 | |
|   goreleaser:
 | |
|     runs-on: ubuntu-latest
 | |
|     steps:
 | |
|       - uses: actions/checkout@v5
 | |
|         with:
 | |
|           fetch-depth: 0
 | |
|       - uses: actions/setup-go@v5
 | |
|         with:
 | |
|           go-version-file: go.mod
 | |
|       - uses: goreleaser/goreleaser-action@v6
 | |
|         with:
 | |
|           version: latest
 | |
|           args: release --clean ${{ env.SNAPSHOT }}
 |