From c7e96e05816661240fa6de6eb296243b8a4fe1ae Mon Sep 17 00:00:00 2001 From: Philipp Sauter <46172817+sauterp@users.noreply.github.com> Date: Thu, 26 Oct 2023 18:07:39 +0200 Subject: [PATCH] publish releases as rpm packages on SOS (#555) We use a script in go.mk as a custom publisher to publish releases to SOS. As with debian releases, we only keep the last 10 versions of the cli available in the bucket. The packages can be installed on Fedora by adding a repo file `/etc/yum.repos.d/exoscale-cli.repo` with the following content: ``` [exoscale-cli-repo] name=exocale-cli baseurl=https://sos-ch-gva-2.exo.io/exoscale-packages/rpm/cli enabled=1 repo_gpgcheck=1 gpgcheck=0 gpgkey=https://keys.openpgp.org/vks/v1/by-fingerprint/7100E8BFD6199CE0374CB7F003686F8CDE378D41 ``` --------- Co-authored-by: Philipp Sauter --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 9 ++++++++- go.mk | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8c5af264..ab5aae6e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: id: get-version-tag shell: bash - - run: echo "linux_amd64_checksum="$(grep -P 'exoscale-cli_[0-9]+\.[0-9]+\.[0-9]_linux_amd64.tar.gz' dist/exoscale-cli_*_checksums.txt | head -n 1 | cut -c1-64) >> $GITHUB_OUTPUT + - run: echo "linux_amd64_checksum="$(grep -P 'exoscale-cli_[0-9]+\.[0-9]+\.[0-9]+_linux_amd64.tar.gz' dist/exoscale-cli_*_checksums.txt | head -n 1 | cut -c1-64) >> $GITHUB_OUTPUT id: get-linux-amd64-checksum shell: bash diff --git a/.goreleaser.yml b/.goreleaser.yml index 9f7fc3b2..4ede5d4f 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -128,10 +128,17 @@ scoops: branch: master publishers: + - name: rpms + env: + - AWS_ACCESS_KEY_ID={{ .Env.EXOSCALE_API_KEY }} + - AWS_SECRET_ACCESS_KEY={{ .Env.EXOSCALE_API_SECRET }} + ids: + - nfpms + cmd: ./go.mk/scripts/publish-rpm-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages rpm/cli 10 - name: aptly env: - AWS_ACCESS_KEY_ID={{ .Env.EXOSCALE_API_KEY }} - AWS_SECRET_ACCESS_KEY={{ .Env.EXOSCALE_API_SECRET }} ids: - nfpms - cmd: ./go.mk/scripts/publish-deb-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages deb/cli 10 + cmd: ./go.mk/scripts/publish-deb-artifact-to-sos.sh {{ .ArtifactPath }} exoscale-packages deb/cli 10 {{ .ProjectName }} diff --git a/go.mk b/go.mk index fbe91d29..314a757b 160000 --- a/go.mk +++ b/go.mk @@ -1 +1 @@ -Subproject commit fbe91d29fd0bc1f30f1deeea92240abe7671f040 +Subproject commit 314a757ba0e1668ebfe7252269d4b58560854c69