From b96adeaa5bed17bc0e44b1e1f647a9b5541e881e Mon Sep 17 00:00:00 2001 From: Owen Date: Thu, 11 Dec 2025 19:35:08 -0500 Subject: [PATCH] Make sure to process version first --- .github/workflows/cicd.yml | 58 ++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 24 deletions(-) diff --git a/.github/workflows/cicd.yml b/.github/workflows/cicd.yml index 316d144..f5dccf8 100644 --- a/.github/workflows/cicd.yml +++ b/.github/workflows/cicd.yml @@ -164,6 +164,16 @@ jobs: echo "Tag ${TAG} not visible after waiting"; exit 1 shell: bash + - name: Update version in main.go + run: | + TAG=${{ env.TAG }} + if [ -f main.go ]; then + sed -i 's/version_replaceme/'"$TAG"'/' main.go + echo "Updated main.go with version $TAG" + else + echo "main.go not found" + fi + - name: Ensure repository is at the tagged commit (dispatch only) if: ${{ github.event_name == 'workflow_dispatch' }} run: | @@ -577,28 +587,28 @@ jobs: # sarif_file: trivy-ghcr.sarif # category: Image Vulnerability Scan - - name: Build binaries - env: - CGO_ENABLED: "0" - GOFLAGS: "-trimpath" - run: | - set -euo pipefail - TAG_VAR="${TAG}" - make go-build-release tag=$TAG_VAR - shell: bash + # - name: Build binaries + # env: + # CGO_ENABLED: "0" + # GOFLAGS: "-trimpath" + # run: | + # set -euo pipefail + # TAG_VAR="${TAG}" + # make go-build-release tag=$TAG_VAR + # shell: bash - - name: Create GitHub Release - uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 - with: - tag_name: ${{ env.TAG }} - generate_release_notes: true - prerelease: ${{ env.IS_RC == 'true' }} - files: | - bin/* - fail_on_unmatched_files: true - draft: true - body: | - ## Container Images - - GHCR: `${{ env.GHCR_REF }}` - - Docker Hub: `${{ env.DH_REF || 'N/A' }}` - **Digest:** `${{ steps.build.outputs.digest }}` + # - name: Create GitHub Release + # uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2 + # with: + # tag_name: ${{ env.TAG }} + # generate_release_notes: true + # prerelease: ${{ env.IS_RC == 'true' }} + # files: | + # bin/* + # fail_on_unmatched_files: true + # draft: true + # body: | + # ## Container Images + # - GHCR: `${{ env.GHCR_REF }}` + # - Docker Hub: `${{ env.DH_REF || 'N/A' }}` + # **Digest:** `${{ steps.build.outputs.digest }}`