mirror of https://github.com/fluxcd/flux2.git
				
				
				
			Add release workflow to CI
							parent
							
								
									8392c4fe24
								
							
						
					
					
						commit
						70072f300a
					
				| @ -0,0 +1,34 @@ | ||||
| name: release | ||||
| 
 | ||||
| on: | ||||
|   push: | ||||
|     tags: | ||||
|       - '*' | ||||
| 
 | ||||
| jobs: | ||||
|   goreleaser: | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Checkout | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Unshallow | ||||
|         run: git fetch --prune --unshallow | ||||
|       - name: Setup Go | ||||
|         uses: actions/setup-go@v2-beta | ||||
|         with: | ||||
|           go-version: 1.14.x | ||||
|       - name: Download release notes utility | ||||
|         env: | ||||
|           GH_REL_URL: https://github.com/buchanae/github-release-notes/releases/download/0.2.0/github-release-notes-linux-amd64-0.2.0.tar.gz | ||||
|         run: cd /tmp && curl -sSL ${GH_REL_URL} | tar xz && sudo mv github-release-notes /usr/local/bin/ | ||||
|       - name: Generate release notes | ||||
|         run: | | ||||
|           echo 'CHANGELOG' > /tmp/release.txt | ||||
|           github-release-notes -org fluxcd -repo toolkit -since-latest-release >> /tmp/release.txt | ||||
|       - name: Run GoReleaser | ||||
|         uses: goreleaser/goreleaser-action@v1 | ||||
|         with: | ||||
|           version: latest | ||||
|           args: release --release-notes=/tmp/release.txt | ||||
|         env: | ||||
|           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||
| @ -0,0 +1,14 @@ | ||||
| builds: | ||||
|   - main: ./cmd/tk | ||||
|     binary: tk | ||||
|     goos: | ||||
|       - darwin | ||||
|       - linux | ||||
|     goarch: | ||||
|       - amd64 | ||||
|     env: | ||||
|       - CGO_ENABLED=0 | ||||
| archives: | ||||
|   - name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" | ||||
|     files: | ||||
|       - none* | ||||
					Loading…
					
					
				
		Reference in New Issue