Skip to content

Commit 25d26dc

Browse files
Publish Linux packages to Packagecloud (#13)
* Publish to packagecloud * Remove Alpine Linux packages, as not accepted by packagecloud * Update README.md with instructions for Linux packages * Consolidate Red Hat and Fedora instructions * Update comment * Skip publishing to Packagecloud for prereleases * Fix spelling in comment * Add link to manual repository installation instructions
1 parent b0f2074 commit 25d26dc

File tree

3 files changed

+41
-12
lines changed

3 files changed

+41
-12
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: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ nfpms:
6565
formats:
6666
- deb
6767
- rpm
68-
- apk
6968
bindir: /usr/bin
7069
priority: extra
7170
file_name_template: "{{ .ConventionalFileName }}"
@@ -93,7 +92,7 @@ blobs:
9392
region: us-east-1
9493
directory: "install"
9594
extra_files_only: true
96-
disable: '{{ ne .Prerelease "" }}' # Skip this step for pre-releases
95+
disable: '{{ ne .Prerelease "" }}' # Skip this step for prereleases
9796
extra_files:
9897
- glob: ./latest.txt
9998
name_template: "latest.txt"
@@ -114,7 +113,7 @@ homebrew_casks:
114113
Command-line interface for managing TigerData Cloud Platform resources
115114
binary: tiger
116115
license: Apache-2.0
117-
skip_upload: auto
116+
skip_upload: auto # Skips prerelease builds
118117
url:
119118
template: "https://tiger-cli-releases.s3.us-east-1.amazonaws.com/releases/{{ .Tag }}/{{ .ArtifactName }}"
120119
hooks:
@@ -146,6 +145,23 @@ changelog:
146145
- "^specs:"
147146
# TODO: Other files that should be ignored
148147

148+
# PackageCloud publisher for Linux packages
149+
publishers:
150+
# Upload all Linux packages (deb, rpm) to PackageCloud
151+
- name: packagecloud
152+
disable: '{{ ne .Prerelease "" }}' # Skip this step for prereleases
153+
ids:
154+
- packages # Only publish nfpms packages (Linux packages)
155+
cmd: >-
156+
package_cloud push timescale/tiger-cli/{{-
157+
if contains .ArtifactPath ".deb" -}}
158+
any/any
159+
{{- else if contains .ArtifactPath ".rpm" -}}
160+
rpm_any/rpm_any
161+
{{- end }} {{ .ArtifactPath }}
162+
env:
163+
- PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }}
164+
149165
# Release configuration
150166
release:
151167
github:

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,28 @@ brew install timescale/tap/tiger-cli
4646
go install github.com/timescale/tiger-cli/cmd/tiger@latest
4747
```
4848

49-
### Direct binary download
49+
### Debian/Ubuntu
5050
```bash
51-
curl -LO https://github.com/timescale/tiger-cli/releases/latest/download/tiger-cli_$(uname -s)_$(uname -m).tar.gz
52-
tar -xzf tiger-cli_$(uname -s)_$(uname -m).tar.gz
53-
chmod +x tiger
54-
mkdir -p ~/.local/bin && mv tiger ~/.local/bin/
51+
# Add repository
52+
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.deb.sh | sudo bash
53+
54+
# Install tiger-cli
55+
sudo apt-get install tiger-cli
5556
```
5657

57-
### Debian/Ubuntu package
58+
For manual repository installation instructions, see [here](https://packagecloud.io/timescale/tiger-cli/install#manual-deb).
59+
60+
### Red Hat/CentOS/Fedora
5861
```bash
59-
curl -LO https://github.com/timescale/tiger-cli/releases/latest/download/tiger-cli_linux_$(dpkg --print-architecture).deb
60-
sudo dpkg -i tiger-cli_linux_$(dpkg --print-architecture).deb
62+
# Add repository
63+
curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.rpm.sh | sudo bash
64+
65+
# Install tiger-cli
66+
sudo yum install tiger-cli
6167
```
6268

69+
For manual repository installation instructions, see [here](https://packagecloud.io/timescale/tiger-cli/install#manual-rpm).
70+
6371
## Usage
6472

6573
### Global Configuration
@@ -155,7 +163,7 @@ go test ./internal/tiger/cmd -v -run Integration
155163
#### What Integration Tests Cover
156164

157165
- **Authentication lifecycle**: Login with credentials, verify authentication, logout
158-
- **Service management**: Create, list, describe, and delete database services
166+
- **Service management**: Create, list, describe, and delete database services
159167
- **Password management**: Update service passwords with keychain storage
160168
- **Database connectivity**: Generate connection strings and execute psql commands
161169
- **Output formats**: Validate JSON, YAML, and table output formats

0 commit comments

Comments
 (0)