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:
1313 uses : actions/checkout@v2
1414 with :
1515 fetch-depth : 0
16+
17+ - name : Install Cloudsmith CLI
18+ run : pip install cloudsmith-cli==0.31.1
19+
1620 - name : Set up Go
1721 uses : actions/setup-go@v2
1822 with :
1923 go-version : 1.16
24+
2025 - name : Run GoReleaser
2126 uses : goreleaser/goreleaser-action@v2
2227 with :
2328 distribution : goreleaser
2429 version : latest
2530 args : release --rm-dist
2631 env :
32+ # To publish the release on GitHub
2733 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
34+ # To publish on the Homebrew tap
2835 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:
1717 # Default build flags is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
1818
1919nfpms :
20- - formats :
20+ - id : deb_rpm
21+ formats :
2122 - deb
2223 - rpm
2324 dependencies :
@@ -70,3 +71,11 @@ brews:
7071 commit_msg_template : " Brew formula update for {{ .ProjectName }} version {{ .Tag }}"
7172 folder : Formula
7273 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
3838brew install src-fingerprint
3939```
4040
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+
4150### From the sources
4251
4352You 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