From 630c15c35d863b3f7ef51f0a41e7884b7aca22b2 Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 5 Oct 2021 14:54:18 -0700 Subject: [PATCH] Upload NGINX Ingress Controller binaries to release --- .github/workflows/ci.yml | 22 ++++++++-------------- .goreleaser.yml | 9 ++++++++- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 89abc2f9a8..adbb372062 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -225,11 +225,18 @@ jobs: uses: actions/setup-go@v2 with: go-version: ${{ needs.checks.outputs.go_version }} + - name: Publish Release Notes on new tag + uses: release-drafter/release-drafter@v5 + with: + publish: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + if: ${{ startsWith(github.ref, 'refs/tags/') }} - name: Build binaries uses: goreleaser/goreleaser-action@v2 with: version: latest - args: build --rm-dist --id kubernetes-ingress ${{ github.event_name == 'pull_request' && '--single-target' || '' }} ${{ !startsWith(github.ref, 'refs/tags/') && '--snapshot' || '' }} + args: ${{ !startsWith(github.ref, 'refs/tags/') && 'build --snapshot' || 'release' }} ${{ github.event_name == 'pull_request' && '--single-target' || '' }} --rm-dist --id kubernetes-ingress env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOPATH: ${{ needs.check.outputs.go_path }} @@ -400,16 +407,3 @@ jobs: git -c user.name='${{ env.GIT_NAME }}' -c user.email='${{ env.GIT_MAIL }}' \ commit -m "NGINX Ingress Controller - Release ${{ needs.package-helm.outputs.type }} ${{ needs.package-helm.outputs.version }}" git push -u origin master - - publish-release-notes: - name: Publish Release Notes - runs-on: ubuntu-20.04 - needs: release-helm - if: ${{ startsWith(github.ref, 'refs/tags/') }} - steps: - - name: Publish Release Notes - uses: release-drafter/release-drafter@v5 - with: - publish: true - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 38bb2d4cd8..3122f3aa94 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -38,6 +38,13 @@ builds: tags: - aws archives: -- format: binary + - id: kubernetes-ingress + format: binary + builds: [kubernetes-ingress] + - id: aws + format: binary + builds: [aws] changelog: skip: true +release: + ids: [kubernetes-ingress]