File tree Expand file tree Collapse file tree 4 files changed +46
-1
lines changed Expand file tree Collapse file tree 4 files changed +46
-1
lines changed Original file line number Diff line number Diff line change @@ -13,16 +13,25 @@ jobs:
13
13
uses : actions/checkout@v2
14
14
with :
15
15
fetch-depth : 0
16
+
17
+ - name : Install Cloudsmith CLI
18
+ run : pip install cloudsmith-cli==0.31.1
19
+
16
20
- name : Set up Go
17
21
uses : actions/setup-go@v2
18
22
with :
19
23
go-version : 1.16
24
+
20
25
- name : Run GoReleaser
21
26
uses : goreleaser/goreleaser-action@v2
22
27
with :
23
28
distribution : goreleaser
24
29
version : latest
25
30
args : release --rm-dist
26
31
env :
32
+ # To publish the release on GitHub
27
33
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34
+ # To publish on the Homebrew tap
28
35
PAT_GITHUB : ${{ secrets.PAT_GITHUB }}
36
+ # To publish on Cloudsmith
37
+ CLOUDSMITH_API_KEY : ${{ secrets.CLOUDSMITH_API_KEY }}
Original file line number Diff line number Diff line change @@ -17,7 +17,8 @@ builds:
17
17
# Default build flags is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
18
18
19
19
nfpms :
20
- - formats :
20
+ - id : deb_rpm
21
+ formats :
21
22
- deb
22
23
- rpm
23
24
dependencies :
@@ -70,3 +71,11 @@ brews:
70
71
commit_msg_template : " Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
71
72
folder : Formula
72
73
description : " src-fingerprint is a CLI util to easily compute the fileshas associated to a set of git repositories."
74
+
75
+ publishers :
76
+ - name : cloudsmith
77
+ ids :
78
+ - deb_rpm
79
+ cmd : " scripts/goreleaser-cloudsmith-publisher {{ .Version }} {{ abs .ArtifactPath }}"
80
+ env :
81
+ - CLOUDSMITH_API_KEY={{ .Env.CLOUDSMITH_API_KEY }}
Original file line number Diff line number Diff line change @@ -38,6 +38,15 @@ brew tap gitguardian/tap
38
38
brew install src-fingerprint
39
39
```
40
40
41
+ ### Linux packages
42
+
43
+ Deb and RPM packages are available on [ Cloudsmith] ( https://cloudsmith.io/~gitguardian/repos/src-fingerprint/packages/ ) .
44
+
45
+ Setup instructions:
46
+
47
+ - [ Deb packages] ( https://cloudsmith.io/~gitguardian/repos/src-fingerprint/setup/#formats-deb )
48
+ - [ RPM packages] ( https://cloudsmith.io/~gitguardian/repos/src-fingerprint/setup/#formats-rpm )
49
+
41
50
### From the sources
42
51
43
52
You need ` go ` installed and ` GOBIN ` in your ` PATH ` . Once that is done, run the
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ set -euo pipefail
3
+
4
+ version=" $1 "
5
+ artifact_path=" $2 "
6
+
7
+ case " $artifact_path " in
8
+ * .deb)
9
+ cloudsmith push deb gitguardian/src-fingerprint/any-distro/any-version " $artifact_path "
10
+ ;;
11
+ * .rpm)
12
+ cloudsmith push rpm gitguardian/src-fingerprint/any-distro/any-version " $artifact_path "
13
+ ;;
14
+ * )
15
+ echo " Unsupported artifact format '$artifact_path '"
16
+ exit 1
17
+ ;;
18
+ esac
You can’t perform that action at this time.
0 commit comments