From 91860b8e5e28d1c3cdbf310e31f832406e5201d7 Mon Sep 17 00:00:00 2001 From: Andrew Morozko Date: Fri, 9 Aug 2024 14:01:02 +0400 Subject: [PATCH] Fetch tags Thanks to https://github.com/actions/checkout/pull/579#issuecomment-1615799806 --- .github/workflows/main.yml | 4 ++++ codegen/gen_docs.sh | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da07b768..a13035be 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -73,6 +73,10 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - name: Fetch all tags + # checkout only gets the latest commit, so it has no tag info + run: git fetch --depth=1 --tags + - uses: actions/setup-go@v5 with: go-version: "1.22.x" diff --git a/codegen/gen_docs.sh b/codegen/gen_docs.sh index 1bccee79..4c7de0ac 100755 --- a/codegen/gen_docs.sh +++ b/codegen/gen_docs.sh @@ -3,4 +3,4 @@ set -e cd "$(dirname "$0")/.." -go run ./tools/docgen --version $(git describe --tags --abbrev=0) --output ./docs/plugins \ No newline at end of file +go run ./tools/docgen --version $(git tag -l --sort=-creatordate | head -n1) --output ./docs/plugins \ No newline at end of file