File tree Expand file tree Collapse file tree 4 files changed +101
-6
lines changed Expand file tree Collapse file tree 4 files changed +101
-6
lines changed Original file line number Diff line number Diff line change 51
51
GITHUB_REPOSITORY_NAME : ${{ github.event.repository.name }}
52
52
VERSION : ${{ inputs.version_number }}
53
53
run : make generate-all-manifests
54
+ - name : Log in to MongoDB Docker registry
55
+ uses : docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567
56
+ with :
57
+ registry : ${{ secrets.ARTIFACTORY_REGISTRY }}
58
+ username : ${{ secrets.ARTIFACTORY_USER }}
59
+ password : ${{ secrets.ARTIFACTORY_PASSWORD }}
54
60
- name : Run GoReleaser
55
61
uses : goreleaser/goreleaser-action@90a3faa9d0182683851fbfa97ca1a2cb983bfca3
56
62
with :
57
63
args : release --clean
58
64
env :
59
65
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
66
+ AUTHENTICODE_KEY_NAME : ${{ secrets.AUTHENTICODE_KEY_NAME }}
67
+ ARTIFACTORY_REGISTRY : ${{ secrets.ARTIFACTORY_REGISTRY }}
68
+ ARTIFACTORY_SIGN_USER : ${{ secrets.ARTIFACTORY_SIGN_USER }}
69
+ ARTIFACTORY_SIGN_PASSWORD : ${{ secrets.ARTIFACTORY_SIGN_PASSWORD }}
Original file line number Diff line number Diff line change @@ -3,15 +3,68 @@ project_name: atlas-cli-plugin-terraform
3
3
4
4
version : 2
5
5
6
+ before :
7
+ hooks :
8
+ - curl https://pgp.mongodb.com/atlas-cli.asc -o signature.asc
9
+
6
10
builds :
7
- - id : " atlas-cli-plugin-terraform"
8
- main : ./cmd/plugin/main.go
9
- binary : ./binary
11
+ - id : linux
12
+ goos : [linux]
13
+ goarch : [amd64, arm64]
14
+ << : &build_defaults
15
+ binary : ./binary
16
+ main : ./cmd/plugin
17
+ - id : macos
18
+ goos : [darwin]
19
+ goarch : [amd64, arm64]
20
+ << : *build_defaults
21
+ - id : windows
22
+ goos : [windows]
23
+ goarch : [amd64]
24
+ goamd64 : [v1]
25
+ << : *build_defaults
26
+ hooks :
27
+ post : # Notarize the Windows binary replacing the one created by goreleaser
28
+ - cmd : ./scripts/windows_notarize.sh
29
+ output : true
10
30
11
31
archives :
12
- - files :
13
- - src : ' ./bin/manifest{{ if eq .Os "windows" }}.windows{{end}}.yml'
14
- dst : ./manifest.yml
32
+ - id : linux
33
+ builds : [linux]
34
+ << : &archive_defaults
35
+ files :
36
+ - src : ' ./bin/manifest{{ if eq .Os "windows" }}.windows{{end}}.yml'
37
+ dst : ./manifest.yml
38
+ - id : macos
39
+ builds : [macos]
40
+ << : *archive_defaults
41
+ - id : windows
42
+ builds : [windows]
43
+ << : *archive_defaults
44
+
45
+ signs :
46
+ - id : all_artifacts
47
+ signature : " ${artifact}.sig"
48
+ cmd : " ./scripts/notarize.sh"
49
+ ids :
50
+ - linux
51
+ - macos
52
+ - windows
53
+ artifacts : all
54
+ output : true
15
55
16
56
release :
17
57
prerelease : auto
58
+ extra_files :
59
+ - glob : ./*.asc
60
+
61
+ gomod : # https://goreleaser.com/customization/verifiable_builds/
62
+ # Proxy a module from proxy.golang.org, making the builds verifiable.
63
+ # This will only be effective if running against a tag. Snapshots will ignore
64
+ # this setting.
65
+ # Notice: for this to work your `build.main` must be a package, not a `.go` file.
66
+ proxy : false
67
+ # Sets the `-mod` flag value.
68
+ #
69
+ # Since: v1.7
70
+ mod : mod
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -Eeou pipefail
4
+
5
+ if [[ -f " ${artifact:? } " ]]; then
6
+ echo " notarizing package ${artifact} "
7
+
8
+ docker run \
9
+ -e GRS_CONFIG_USER1_USERNAME=" ${ARTIFACTORY_SIGN_USER} " \
10
+ -e GRS_CONFIG_USER1_PASSWORD=" ${ARTIFACTORY_SIGN_PASSWORD} " \
11
+ --rm -v " $( pwd) " :" $( pwd) " -w " $( pwd) " \
12
+ " ${ARTIFACTORY_REGISTRY} /release-tools-container-registry-local/garasign-gpg" \
13
+ /bin/bash -c " gpgloader && gpg --yes -v --armor -o ${artifact} .sig --detach-sign ${artifact} "
14
+ fi
15
+
16
+ echo " Signing of ${artifact} completed."
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ set -Eeou pipefail
4
+
5
+ EXE_FILE=" ./dist/windows_windows_amd64_v1/binary.exe"
6
+
7
+ if [[ -f " $EXE_FILE " ]]; then
8
+ echo " signing Windows binary: ${EXE_FILE} "
9
+
10
+ docker run \
11
+ -e GRS_CONFIG_USER1_USERNAME=" ${ARTIFACTORY_SIGN_USER} " \
12
+ -e GRS_CONFIG_USER1_PASSWORD=" ${ARTIFACTORY_SIGN_PASSWORD} " \
13
+ --rm -v " $( pwd) " :" $( pwd) " -w " $( pwd) " \
14
+ " ${ARTIFACTORY_REGISTRY} /release-tools-container-registry-local/garasign-jsign" \
15
+ /bin/bash -c " jsign --tsaurl http://timestamp.digicert.com -a ${AUTHENTICODE_KEY_NAME} \" ${EXE_FILE} \" "
16
+ fi
You can’t perform that action at this time.
0 commit comments