diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1404a7a7c08..3f840f67ffc 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -36,14 +36,19 @@ jobs: # grab latest release url of the JimpleLSP jar and download it - run: curl -s -L -o ./jimplelsp.jar $(curl -s https://api.github.com/repos/swissiety/jimpleLsp/releases/latest | grep 'browser_download_url".*jar"' | cut -d ':' -f 2,3 | tr -d \") - - name: get most recent tag - id: previoustag - uses: "WyriHaximus/github-action-get-previous-tag@v1" - with: - fallback: 1.0.0 # Optional fallback tag to use when no tag can be found + + - run: ls + - run: git describe --tags `git rev-list --tags --max-count=1` + - run: git tag --sort=committerdate + + - name: get latest release tag + id: "latestgittag" + run: latestgittagvar="$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 2-7)" + + - run: echo "[${{steps.latestgittag.outputs.latestgittagvar}}]" - name: replace "{{ git_latest_release }}" with latest release tag version in .md files - run: sed -i 's\{{ git_latest_release }}\'${{ steps.previoustag.outputs.tag }}'\g' docs/**.md + run: sed -i 's\{{ git_latest_release }}\'${{steps.latestgittag.outputs.latestgittagvar}}'\g' docs/**.md - run: git fetch origin gh-pages --depth=1 - name: Configure git user