From 35f1bdad473469ce0934b77e5e22940467b5a5b9 Mon Sep 17 00:00:00 2001 From: Ivan Dimanov <90039061+IvanDimanov-MoveDigital@users.noreply.github.com> Date: Thu, 7 Apr 2022 09:45:42 +0300 Subject: [PATCH] feat: Get release version --- .github/workflows/deploy_after_release.yaml | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy_after_release.yaml b/.github/workflows/deploy_after_release.yaml index 9ffbcd4..3f376e9 100644 --- a/.github/workflows/deploy_after_release.yaml +++ b/.github/workflows/deploy_after_release.yaml @@ -15,4 +15,18 @@ jobs: run: | echo github.event_name = ${{ github.event_name }} echo github.event.action = ${{ github.event.action }} - git for-each-ref --sort=-taggerdate --format '%(refname:lstrip=2)' --count=1 refs/tags + echo $(git for-each-ref --sort=-taggerdate --format '%(refname:lstrip=2)' --count=1 refs/tags) + + - name: Generate release version + id: releaseVersion + run: | + echo github.event_name = ${{ github.event_name }} + echo github.event.action = ${{ github.event.action }} + echo $(git for-each-ref --sort=-taggerdate --format '%(refname:lstrip=2)' --count=1 refs/tags) + + export VERSION=$(git for-each-ref --sort=-taggerdate --format '%(refname:lstrip=2)' --count=1 refs/tags | sed 's/v//) + echo "::set-output name=version::${VERSION}" + + - name: Debug + run: | + echo ${{ steps.releaseVersion.outputs.version }}