Skip to content

Commit

Permalink
Added prebuild for go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 7, 2024
1 parent 575627a commit 3e74678
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,22 @@ jobs:
fetch-depth: 0
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA/SOARCA
- name: Make repo safe
run: git config --global --add safe.directory /__w/SOARCA/SOARCA

- name: Install swaggo
run: go install github.com/swaggo/swag/cmd/swag@latest

- name: Build swagger
run: swag init -o swaggerdocs

- name: Build sbom
run: |
mkdir -p sbom
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 cyclonedx-gomod app -json -licenses -output sbom/${BINARY_NAME}-${VERSION}-linux-amd64.bom.json
CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 cyclonedx-gomod app -json -licenses -output sbom/${BINARY_NAME}-${VERSION}-darwin-amd64.bom.json
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 cyclonedx-gomod app -json -licenses -output sbom/${BINARY_NAME}-${VERSION}-windows-amd64.bom.json
- name: Release soarca binary
uses: goreleaser/goreleaser-action@v5
with:
Expand Down

0 comments on commit 3e74678

Please sign in to comment.