Skip to content

Commit d77a2c0

Browse files
Publish to packagecloud
1 parent 619c882 commit d77a2c0

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-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: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,18 @@ 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: 'package_cloud push timescale/tiger-cli/{{ if eq (index (split .ArtifactPath ".") -1) "deb" }}any/any{{ else if eq (index (split .ArtifactPath ".") -1) "rpm" }}rpm_any/rpm_any{{ else if eq (index (split .ArtifactPath ".") -1) "apk" }}alpine_any/alpine_any{{ end }} {{ .ArtifactPath }}'
158+
env:
159+
- PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
160+
149161
# Release configuration
150162
release:
151163
github:

0 commit comments

Comments
 (0)