Skip to content

Commit dc7dcfa

Browse files
authored
Update GoReleaser config (#722)
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
1 parent 64cdf27 commit dc7dcfa

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ jobs:
7979
steps:
8080
- name: Checkout Repository
8181
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
82+
8283
- name: Setup Node.js Environment
8384
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # v3.6.0
8485
with:
@@ -128,13 +129,14 @@ jobs:
128129
uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b # v4.2.0
129130
with:
130131
version: latest
131-
args: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} --rm-dist
132+
args: ${{ startsWith(github.ref, 'refs/tags/') && 'release' || 'build --snapshot' }} --clean
132133
env:
133134
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
134135
GOPATH: ${{ needs.vars.outputs.go_path }}
135136
AZURE_STORAGE_ACCOUNT: ${{ secrets.AZURE_STORAGE_ACCOUNT }}
136137
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }}
137138
AZURE_BUCKET_NAME: ${{ secrets.AZURE_BUCKET_NAME }}
139+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}
138140

139141
- name: Cache Artifacts
140142
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1

.goreleaser.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,26 @@ builds:
2020
changelog:
2121
skip: true
2222

23-
checksum:
24-
name_template: 'checksums.txt'
25-
2623
archives:
2724
- id: gateway
2825

2926
sboms:
3027
- artifacts: archive
31-
32-
release:
33-
ids: [gateway]
28+
documents:
29+
- "${artifact}.spdx.json"
3430

3531
blobs:
3632
- provider: azblob
3733
bucket: '{{.Env.AZURE_BUCKET_NAME}}'
38-
extra_files:
39-
- glob: ./dist/**.sbom
34+
35+
announce:
36+
slack:
37+
enabled: true
38+
channel: '#announcements'
39+
message_template: 'NGINX Kubernetes Gateway {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}'
40+
41+
milestones:
42+
- close: true
43+
44+
snapshot:
45+
name_template: 'edge'

0 commit comments

Comments
 (0)