diff --git a/.github/workflows/build+test+deploy.yml b/.github/workflows/build+test+deploy.yml index c63045fe2..d05623ba8 100644 --- a/.github/workflows/build+test+deploy.yml +++ b/.github/workflows/build+test+deploy.yml @@ -43,6 +43,11 @@ jobs: steps: - uses: actions/checkout@v4 + + with: + # we need fetch-depth: 0 because we use the `git describe` command in build.fsx + fetch-depth: 0 + - name: Restore tools run: dotnet tool restore - name: Build diff --git a/build.fsx b/build.fsx index 5483a6444..8c69e65fe 100644 --- a/build.fsx +++ b/build.fsx @@ -224,6 +224,7 @@ Target.create "Push" (fun _ -> | None -> failwith "GITHUB_SHA should have been populated" | Some commitHash -> + // NOTE: for this to work, github workflow needs to have `fetch-depth: 0` in its checkout action let gitArgs = $"describe --exact-match --tags %s{commitHash}" let proc = CreateProcess.fromRawCommandLine "git" gitArgs