From 996daf6a4b3043b94ce6cca3149115e563ff22ee Mon Sep 17 00:00:00 2001 From: Jani Nikula Date: Tue, 22 Aug 2023 22:48:35 +0300 Subject: [PATCH] github: generate documentation version matrix dynamically Updating the release tag in docs.yml is tedious. Generate the action matrix dynamically. --- .github/config.sh | 23 +++++++++++++++++++++++ .github/workflows/docs.yml | 21 +++++++++++++++------ 2 files changed, 38 insertions(+), 6 deletions(-) create mode 100755 .github/config.sh diff --git a/.github/config.sh b/.github/config.sh new file mode 100755 index 00000000..8b706158 --- /dev/null +++ b/.github/config.sh @@ -0,0 +1,23 @@ +#!/bin/bash +# Copyright (c) 2023, Jani Nikula +# Licensed under the terms of BSD 2-Clause, see LICENSE for details. + +# Output a json matrix for building multiple versions of documentation + +# Can't use git describe unless full history has been fetched! +release=$(git tag --list --sort=version:refname | tail -1) + +jq -c . <