diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 546a924b..ae3ebf82 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,9 @@ jobs: with: go-version-file: 'go.mod' + - name: Install package_cloud gem + run: sudo gem install package_cloud --no-doc + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 with: @@ -37,3 +40,5 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.ORG_AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.ORG_AWS_SECRET_ACCESS_KEY }} AWS_REGION: us-east-1 + # PackageCloud credentials for publishing Linux packages + PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }} diff --git a/.goreleaser.yaml b/.goreleaser.yaml index a81e90bf..2b69d41c 100644 --- a/.goreleaser.yaml +++ b/.goreleaser.yaml @@ -65,7 +65,6 @@ nfpms: formats: - deb - rpm - - apk bindir: /usr/bin priority: extra file_name_template: "{{ .ConventionalFileName }}" @@ -93,7 +92,7 @@ blobs: region: us-east-1 directory: "install" extra_files_only: true - disable: '{{ ne .Prerelease "" }}' # Skip this step for pre-releases + disable: '{{ ne .Prerelease "" }}' # Skip this step for prereleases extra_files: - glob: ./latest.txt name_template: "latest.txt" @@ -114,7 +113,7 @@ homebrew_casks: Command-line interface for managing TigerData Cloud Platform resources binary: tiger license: Apache-2.0 - skip_upload: auto + skip_upload: auto # Skips prerelease builds url: template: "https://tiger-cli-releases.s3.us-east-1.amazonaws.com/releases/{{ .Tag }}/{{ .ArtifactName }}" hooks: @@ -146,6 +145,23 @@ changelog: - "^specs:" # TODO: Other files that should be ignored +# PackageCloud publisher for Linux packages +publishers: + # Upload all Linux packages (deb, rpm) to PackageCloud + - name: packagecloud + disable: '{{ ne .Prerelease "" }}' # Skip this step for prereleases + ids: + - packages # Only publish nfpms packages (Linux packages) + cmd: >- + package_cloud push timescale/tiger-cli/{{- + if contains .ArtifactPath ".deb" -}} + any/any + {{- else if contains .ArtifactPath ".rpm" -}} + rpm_any/rpm_any + {{- end }} {{ .ArtifactPath }} + env: + - PACKAGECLOUD_TOKEN={{ .Env.PACKAGECLOUD_TOKEN }} + # Release configuration release: github: diff --git a/README.md b/README.md index 999ebd7d..1504d422 100644 --- a/README.md +++ b/README.md @@ -46,20 +46,28 @@ brew install timescale/tap/tiger-cli go install github.com/timescale/tiger-cli/cmd/tiger@latest ``` -### Direct binary download +### Debian/Ubuntu ```bash -curl -LO https://github.com/timescale/tiger-cli/releases/latest/download/tiger-cli_$(uname -s)_$(uname -m).tar.gz -tar -xzf tiger-cli_$(uname -s)_$(uname -m).tar.gz -chmod +x tiger -mkdir -p ~/.local/bin && mv tiger ~/.local/bin/ +# Add repository +curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.deb.sh | sudo bash + +# Install tiger-cli +sudo apt-get install tiger-cli ``` -### Debian/Ubuntu package +For manual repository installation instructions, see [here](https://packagecloud.io/timescale/tiger-cli/install#manual-deb). + +### Red Hat/CentOS/Fedora ```bash -curl -LO https://github.com/timescale/tiger-cli/releases/latest/download/tiger-cli_linux_$(dpkg --print-architecture).deb -sudo dpkg -i tiger-cli_linux_$(dpkg --print-architecture).deb +# Add repository +curl -s https://packagecloud.io/install/repositories/timescale/tiger-cli/script.rpm.sh | sudo bash + +# Install tiger-cli +sudo yum install tiger-cli ``` +For manual repository installation instructions, see [here](https://packagecloud.io/timescale/tiger-cli/install#manual-rpm). + ## Usage ### Global Configuration @@ -155,7 +163,7 @@ go test ./internal/tiger/cmd -v -run Integration #### What Integration Tests Cover - **Authentication lifecycle**: Login with credentials, verify authentication, logout -- **Service management**: Create, list, describe, and delete database services +- **Service management**: Create, list, describe, and delete database services - **Password management**: Update service passwords with keychain storage - **Database connectivity**: Generate connection strings and execute psql commands - **Output formats**: Validate JSON, YAML, and table output formats