diff --git a/.github/workflows/veracode-build.yml b/.github/workflows/veracode-build.yml index 5da05c98f3..e23df582c2 100644 --- a/.github/workflows/veracode-build.yml +++ b/.github/workflows/veracode-build.yml @@ -58,13 +58,20 @@ jobs: steps: - - name: Set env - run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV + - name: Get Tags + id: tags + run: | + git fetch --tags + echo "Tags fetched" + - name: Get Latest Tag + id: latest-tag + run: | + latest_tag=$(git describe --tags `git rev-list --tags --max-count=1`) + echo "LATEST_TAG=$latest_tag" >> $GITHUB_ENV - - name: Test + - name: Use Latest Tag run: | - echo $RELEASE_VERSION - echo ${{ env.RELEASE_VERSION }} + echo "The latest tag is $LATEST_TAG" # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it and copies all sources into ZIP file for submitting for analysis. Replace this section with your applications build steps - uses: actions/checkout@v2