Skip to content

Commit caa763a

Browse files
committed
Update GoReleaser and sign packages
1 parent ec4de8f commit caa763a

File tree

5 files changed

+49
-15
lines changed

5 files changed

+49
-15
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ jobs:
6464
needs: [binary, unit-tests]
6565
permissions:
6666
contents: write
67+
id-token: write
6768
steps:
6869
- name: Checkout Repository
6970
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
@@ -94,12 +95,18 @@ jobs:
9495

9596
- name: Download Syft
9697
uses: anchore/sbom-action/download-syft@78fc58e266e87a38d4194b2137a3d4e9bcaf7ca1 # v0.14.3
98+
if: github.ref_type == 'tag'
99+
100+
- name: Install Cosign
101+
uses: sigstore/cosign-installer@6e04d228eb30da1757ee4e1dd75a0ec73a653e06 # v3.1.1
102+
if: github.ref_type == 'tag'
97103

98104
- name: Build binaries
99105
uses: goreleaser/goreleaser-action@336e29918d653399e599bfca99fadc1d7ffbc9f7 # v4.3.0
100106
with:
101107
version: latest
102-
args: release ${{ github.ref_type == 'tag' && '' || '--snapshot' }} --clean
108+
args: ${{ github.ref_type == 'tag' && 'release' || 'build --snapshot' }} --clean
103109
env:
104110
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
105111
GOPATH: ${{ steps.go.outputs.go_path }}
112+
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_COMMUNITY }}

.goreleaser.yml

Lines changed: 33 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ builds:
1313
- 386
1414
- amd64
1515
- arm64
16+
- ppc64le
1617
- s390x
1718
flags:
1819
- -trimpath
@@ -23,19 +24,16 @@ builds:
2324
main: ./cmd/sync
2425
binary: nginx-asg-sync
2526

27+
changelog:
28+
skip: true
29+
2630
archives:
2731
- files:
2832
- README.md
2933
- LICENSE
3034
- CHANGELOG.md
3135
- build/config.yaml.example
3236

33-
sboms:
34-
- artifacts: archive
35-
36-
changelog:
37-
skip: true
38-
3937
nfpms:
4038
- file_name_template: "{{ .ConventionalFileName }}"
4139
vendor: NGINX Inc.
@@ -89,3 +87,32 @@ nfpms:
8987
postinstall: "build/postinstall.sh"
9088
preremove: "build/preremove.sh"
9189
postremove: "build/postremove.sh"
90+
91+
sboms:
92+
- artifacts: archive
93+
documents:
94+
- "${artifact}.spdx.json"
95+
96+
signs:
97+
- cmd: cosign
98+
artifacts: checksum
99+
output: true
100+
certificate: '${artifact}.pem'
101+
args:
102+
- sign-blob
103+
- "--output-signature=${signature}"
104+
- "--output-certificate=${certificate}"
105+
- "${artifact}"
106+
- "--yes"
107+
108+
announce:
109+
slack:
110+
enabled: true
111+
channel: '#announcements'
112+
message_template: 'NGINX Plus Integration with Cloud Autoscaling {{ .Tag }} is out! Check it out: {{ .ReleaseURL }}'
113+
114+
milestones:
115+
- close: true
116+
117+
snapshot:
118+
name_template: 'edge'

LICENSES

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
github.com/Azure/azure-sdk-for-go,https://github.com/Azure/azure-sdk-for-go/blob/v66.0.0/LICENSE.txt,MIT
1+
github.com/Azure/azure-sdk-for-go,https://github.com/Azure/azure-sdk-for-go/blob/v68.0.0/LICENSE.txt,MIT
22
github.com/Azure/go-autorest/autorest,https://github.com/Azure/go-autorest/blob/autorest/v0.11.24/autorest/LICENSE,Apache-2.0
33
github.com/Azure/go-autorest/autorest/adal,https://github.com/Azure/go-autorest/blob/autorest/adal/v0.9.18/autorest/adal/LICENSE,Apache-2.0
4-
github.com/Azure/go-autorest/autorest/azure/auth,https://github.com/Azure/go-autorest/blob/autorest/azure/auth/v0.5.11/autorest/azure/auth/LICENSE,Apache-2.0
4+
github.com/Azure/go-autorest/autorest/azure/auth,https://github.com/Azure/go-autorest/blob/autorest/azure/auth/v0.5.12/autorest/azure/auth/LICENSE,Apache-2.0
55
github.com/Azure/go-autorest/autorest/azure/cli,https://github.com/Azure/go-autorest/blob/autorest/azure/cli/v0.4.5/autorest/azure/cli/LICENSE,Apache-2.0
66
github.com/Azure/go-autorest/autorest/date,https://github.com/Azure/go-autorest/blob/autorest/date/v0.3.0/autorest/date/LICENSE,Apache-2.0
77
github.com/Azure/go-autorest/autorest/to,https://github.com/Azure/go-autorest/blob/autorest/to/v0.4.0/autorest/to/LICENSE,Apache-2.0
@@ -16,5 +16,5 @@ github.com/jmespath/go-jmespath,https://github.com/jmespath/go-jmespath/blob/v0.
1616
github.com/mitchellh/go-homedir,https://github.com/mitchellh/go-homedir/blob/v1.1.0/LICENSE,MIT
1717
github.com/nginxinc/nginx-asg-sync/cmd/sync,https://github.com/nginxinc/nginx-asg-sync/blob/HEAD/LICENSE,BSD-2-Clause
1818
github.com/nginxinc/nginx-plus-go-client/client,https://github.com/nginxinc/nginx-plus-go-client/blob/v0.10.0/LICENSE,Apache-2.0
19-
golang.org/x/crypto/pkcs12,https://cs.opensource.google/go/x/crypto/+/e495a2d5:LICENSE,BSD-3-Clause
19+
golang.org/x/crypto/pkcs12,https://cs.opensource.google/go/x/crypto/+/v0.1.0:LICENSE,BSD-3-Clause
2020
gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ nginx-asg-sync:
1515
.PHONY: build-goreleaser
1616
build-goreleaser:
1717
@goreleaser -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with GoReleaser. Follow the docs to install it https://goreleaser.com/install\n"; exit $$code)
18-
@GOPATH=$(shell go env GOPATH) goreleaser release --rm-dist --snapshot
18+
@GOPATH=$(shell go env GOPATH) goreleaser release --clean --snapshot
1919

2020
.PHONY: build-goreleaser-docker
2121
build-goreleaser-docker:
2222
@docker -v || (code=$$?; printf "\033[0;31mError\033[0m: there was a problem with Docker\n"; exit $$code)
23-
@docker run --rm --privileged -v $(PWD):/go/src/github.com/nginxinc/nginx-asg-sync -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/nginxinc/nginx-asg-sync goreleaser/goreleaser release --snapshot --rm-dist
23+
@docker run --rm --privileged -v $(PWD):/go/src/github.com/nginxinc/nginx-asg-sync -v /var/run/docker.sock:/var/run/docker.sock -w /go/src/github.com/nginxinc/nginx-asg-sync goreleaser/goreleaser release --snapshot --clean
2424

2525
.PHONY: clean
2626
clean:

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Below you will find documentation on how to use nginx-asg-sync.
5959

6060
## Supported Operating Systems and Architectures
6161

62-
We provide `.rpm` and `.deb` packages for `386`, `amd64`, `arm64`, and `s390x`.
62+
We provide `.rpm` and `.deb` packages for `386`, `amd64`, `arm64`, `ppc64le` and `s390x`.
6363

6464
Support for other operating systems or architectures can be added.
6565

@@ -70,8 +70,8 @@ Support for other operating systems or architectures can be added.
7070
- For the latest source code from the main branch, build a software package by following [these
7171
instructions](#building-a-software-package).
7272
2. Install the package:
73-
- For CentOS/RHEL based OSs, run: `$ sudo rpm -i <package-name>.rpm`
74-
- For Debian based OSs, run: `$ sudo dpkg -i <package-name>.deb`
73+
- For CentOS/RHEL based OSs, run: `sudo rpm -i <package-name>.rpm`
74+
- For Debian based OSs, run: `sudo dpkg -i <package-name>.deb`
7575

7676
### NGINX Plus Configuration
7777

0 commit comments

Comments
 (0)