From 1714428f698fdf4f97eed338fb41bb5dc6bec0ab Mon Sep 17 00:00:00 2001 From: Luca Comellini Date: Tue, 6 Jun 2023 18:30:15 -0700 Subject: [PATCH] Update GoReleaser config Changes: - Updates the configuration to remove '--rm-dist' deprecated flag - Adds announce section to announce releases in the NGINX Community slack - Removes release section that was limiting the uploads to the binaries - Changes extension of SBOM artifacts from .sbom to spdx.json to better represent the content of the file (.sbom is an extension that devs at GoReleaser came up with and not standard) - Adds section to automatically close a milestone on release - Adds section to override the version that is injected in the binary for snapshot builds. These are all the builds that are not an official release --- .github/workflows/ci.yml | 4 +++- .goreleaser.yml | 22 ++++++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 690cf49b4..7ed582894 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -79,6 +79,7 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2 + - name: Setup Node.js Environment uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0 with: @@ -128,13 +129,14 @@ jobs: uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0 with: version: latest - args: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} --rm-dist + args: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GOPATH: ${{ needs.vars.outputs.go_path }} AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }} AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }} + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }} - name: Cache Artifacts uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1 diff --git a/.goreleaser.yml b/.goreleaser.yml index 31d23676a..81db61583 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -20,20 +20,26 @@ builds: changelog: skip: true -checksum: - name_template: 'checksums.txt' - archives: - id: gateway sboms: - artifacts: archive - -release: - ids: [gateway] + documents: + - "${artifact}.spdx.json" blobs: - provider: azblob bucket: '{{.Env.AZURE_BUCKET_NAME}}' - extra_files: - - glob: ./dist/**.sbom + +announce: + slack: + enabled: true + channel: '#announcements' + message_template: 'NGINX Kubernetes Gateway {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}' + +milestones: + - close: true + +snapshot: + name_template: 'edge'