Skip to content

Commit 8080563

Browse files
Publish to packagecloud
1 parent 619c882 commit 8080563

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

.github/workflows/release.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ jobs:
2222
with:
2323
go-version-file: 'go.mod'
2424

25+
- name: Install package_cloud gem
26+
run: sudo gem install package_cloud --no-doc
27+
2528
- name: Run GoReleaser
2629
uses: goreleaser/goreleaser-action@v6
2730
with:
@@ -37,3 +40,5 @@ jobs:
3740
AWS_ACCESS_KEY_ID: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }}
3841
AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }}
3942
AWS_REGION: us-east-1
43+
# PackageCloud credentials for publishing Linux packages
44+
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}

.goreleaser.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,26 @@ changelog:
146146
- "^specs:"
147147
# TODO: Other files that should be ignored
148148

149+
# PackageCloud publisher for Linux packages
150+
publishers:
151+
# Upload all Linux packages (deb, rpm, apk) to PackageCloud
152+
- name: packagecloud
153+
# Skip upload if packagecloud credentials are not set
154+
disable: '{{ eq .Env.PACKAGECLOUD_TOKEN "" }}'
155+
ids:
156+
- packages # Only publish nfpms packages (Linux packages)
157+
cmd: >-
158+
package_cloud push timescale/tiger-cli/{{-
159+
if contains .ArtifactPath ".deb" -}}
160+
any/any
161+
{{- else if contains .ArtifactPath ".rpm" -}}
162+
rpm_any/rpm_any
163+
{{- else if contains .ArtifactPath ".apk" -}}
164+
alpine_any/alpine_any
165+
{{- end }} {{ .ArtifactPath }}
166+
env:
167+
- PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
168+
149169
# Release configuration
150170
release:
151171
github:

0 commit comments

Comments
 (0)