Skip to content

Commit

Permalink
Update GoReleaser config (#722)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lucacome authored Jun 7, 2023
1 parent 64cdf27 commit dc7dcfa
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
22 changes: 14 additions & 8 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'

0 comments on commit dc7dcfa

Please sign in to comment.