Skip to content

Commit

Permalink
Add release workflow for multi-platform binaries. (#47)
Browse files Browse the repository at this point in the history
* Add release workflow for multi-platform binaries.
  • Loading branch information
Miles-Garnsey authored May 29, 2024
1 parent ac5a335 commit 68047d7
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,24 @@ jobs:
run: |
docker login -u redhat-isv-containers+5ebee0e40e3deaf258b160d1-robot quay.io -p ${{ secrets.K8SSANDRA_CLIENT_CONNECT_SECRET }}
preflight check container quay.io/redhat-isv-containers/64f725593ba91d38e7246955:${{ steps.vars.outputs.tag_name}} --certification-project-id=64f725593ba91d38e7246955 --pyxis-api-token=${{ secrets.PREFLIGHT_KEY }} --submit --docker-config=$HOME/.docker/config.json
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
cache: true
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: "~> v1"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

32 changes: 32 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
project_name: k8ssandra-client
builds:
- binary: "kubectl-k8ssandra"
main: ./cmd/kubectl-k8ssandra/main.go
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
- windows
goarch:
- amd64
- arm64
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath


# proxies from the go mod proxy before building
# https://goreleaser.com/customization/gomod
gomod:
proxy: false

# config the checksum filename
# https://goreleaser.com/customization/checksum
checksum:
name_template: 'checksums.txt'

# create a source tarball
# https://goreleaser.com/customization/source/
source:
enabled: true

0 comments on commit 68047d7

Please sign in to comment.