Skip to content

Commit

Permalink
Add checksum generation and release asset upload to GitHub Actions wo…
Browse files Browse the repository at this point in the history
…rkflow
  • Loading branch information
H4-8ZSI authored and H4-8ZSI committed Jun 5, 2024
1 parent b339ad4 commit c0ac6da
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/go-provider.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,18 @@ jobs:
go get .
go install github.com/mitchellh/gox@latest
make build
make checksum
- name: Archive Binaries
run: |
mkdir -p release
find bin -type f -exec cp {} release/ \;
cp checksums.txt release/
cd release
tar -czvf terraform-provider-qdrant-cloud.tar.gz *
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: release/terraform-provider-qdrant-cloud.tar.gz
asset_name: terraform-provider-qdrant-cloud.tar.gz
asset_content_type: application/gzip
6 changes: 5 additions & 1 deletion GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ generate-client:
cd internal && swagger-codegen generate -i ./spec.json -l go --output client --additional-properties packageName=cloud

build:
CGO_ENABLED=0 gox \
CGO_ENABLED=0 ~/go/bin/gox \
-osarch="linux/amd64 linux/arm linux/arm64 darwin/amd64 darwin/arm64 windows/amd64" \
-output="bin/{{.OS}}/{{.Arch}}/${BINARY}_v$(VERSION)" \
-tags="netgo" \
Expand All @@ -45,3 +45,7 @@ install: build
.PHONY: generate-help
generate-help:
go generate ./...

.PHONY: checksum
checksum:
find bin -type f -exec sha256sum {} \; > checksums.txt

0 comments on commit c0ac6da

Please sign in to comment.