Kaynağa Gözat

Update build-with-firmwware.yml

Signed-off-by: DerSkythe <31771569+derskythe@users.noreply.github.com>
DerSkythe 2 yıl önce
ebeveyn
işleme
64ba4b83e5
1 değiştirilmiş dosya ile 6 ekleme ve 1 silme
  1. 6 1
      .github/workflows/build-with-firmwware.yml

+ 6 - 1
.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 ) {