From 37a8a0833bf892c7cbaada4b340f9bfaa939ebdb Mon Sep 17 00:00:00 2001 From: Lars Karlslund Date: Thu, 27 Feb 2025 17:40:01 +0100 Subject: [PATCH] Build action fixes --- .github/workflows/autobuild.yml | 11 +++++++++++ build.ps1 | 5 ++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml index 60919be..8a376c9 100644 --- a/.github/workflows/autobuild.yml +++ b/.github/workflows/autobuild.yml @@ -47,6 +47,17 @@ jobs: run: ./build.ps1 shell: pwsh + - name: Create tag "devbuild" for current commit + uses: hole19/git-tag-action@master + if: startsWith(github.ref, 'refs/tags/') != true + env: + TAG: "devbuild" + + - name: Remove latest devbuild + uses: liudonghua123/delete-release-action@v1 + with: + release_name: "devbuild" + - name: Pre-release uses: softprops/action-gh-release@v2 if: startsWith(github.ref, 'refs/tags/') != true diff --git a/build.ps1 b/build.ps1 index a1645c3..28d54ac 100644 --- a/build.ps1 +++ b/build.ps1 @@ -26,8 +26,11 @@ function BuildVariants { if (Get-Command "cyclonedx-gomod" -ErrorAction SilentlyContinue) { + $sbom = "binaries/$prefix-$currentos-$namearch-$VERSION$suffix.bom.json" + if (!(Test-Path $sbom)) { Write-Output "Generating $prefix SBOM for $currentos-$namearch..." - cyclonedx-gomod app -json -licenses -output binaries/$prefix-$currentos-$namearch-$VERSION$suffix.bom.json -main $path . + cyclonedx-gomod app -json -licenses -output $sbom -main $path . + } } } }