From 64ba4b83e541c07f69648d428610c19b92cfa31a Mon Sep 17 00:00:00 2001 From: DerSkythe <31771569+derskythe@users.noreply.github.com> Date: Tue, 19 Dec 2023 07:24:01 +0400 Subject: [PATCH] Update build-with-firmwware.yml Signed-off-by: DerSkythe <31771569+derskythe@users.noreply.github.com> --- .github/workflows/build-with-firmwware.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-with-firmwware.yml b/.github/workflows/build-with-firmwware.yml index c19b4cac2f0..e26169e1b24 100644 --- a/.github/workflows/build-with-firmwware.yml +++ b/.github/workflows/build-with-firmwware.yml @@ -56,6 +56,9 @@ jobs: shell: pwsh run: | $ReleaseVersion = ([string]::IsNullOrWhitespace($env:INPUT_VERSION) ? $env:CURRENT_VERSION : $env:INPUT_VERSION) + if ( $ReleaseVersion.StartsWith('v') ) { + $ReleaseVersion = $ReleaseVersion.Substring(1) + } Write-Output ('RELEASE_VERSION={0}' -f $ReleaseVersion) >> $env:GITHUB_ENV - name: Copy Firmware Files @@ -85,8 +88,9 @@ jobs: cd '${{ env.OFW_PATH }}' if ( '${{ env.CURRENT_VERSION }}' -ne '${{ env.RELEASE_VERSION }}' ) { Write-Output '::warning title=Different version::Current version is ${{ env.CURRENT_VERSION }} but we trying to build ${{ env.RELEASE_VERSION }}' + git checkout tags/v${{ env.RELEASE_VERSION }} -b tmp-build - + if ( $LASTEXITCODE -ne 0 ) { Write-Error '::error title=Cannot checkout to this version::Error during execution checkout to this tag ${{ env.RELEASE_VERSION }}' exit 1 @@ -110,6 +114,7 @@ jobs: if ( '${{ env.CURRENT_VERSION }}' -ne '${{ env.RELEASE_VERSION }}' ) { Write-Output '::warning title=Different version::Current version is ${{ env.CURRENT_VERSION }} but we trying to build ${{ env.RELEASE_VERSION }}' + git checkout tags/v${{ env.RELEASE_VERSION }} -b tmp-build if ( $LASTEXITCODE -ne 0 ) {