Kaynağa Gözat

Update version handling in firmware build workflow

This commit updates the way version input is handled and formatted in the firmware build workflow. This is mainly done by ensuring the input version is properly encapsulated as a string and updating the release version tag so that the minor version parsing is accurate.
DerSkythe 2 yıl önce
ebeveyn
işleme
0802191c3f
1 değiştirilmiş dosya ile 3 ekleme ve 2 silme
  1. 3 2
      .github/workflows/build-with-firmwware.yml

+ 3 - 2
.github/workflows/build-with-firmwware.yml

@@ -94,11 +94,12 @@ jobs:
           GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
           INPUT_VERSION: ${{ inputs.version }}
         run: |
+          Write-Output "::notice title=Version Number::v${{ inputs.version }}"
           $fwInfo = ((gh release view --json tagName,url -R ${{ matrix.url }}) | ConvertFrom-Json)
           cd '${{ env.APP_PATH }}'
           $sha = (git rev-parse --verify HEAD)
           
-          $releaseVersion = $env:INPUT_VERSION
+          $releaseVersion = "$env:INPUT_VERSION"
 
           if ( [string]::IsNullOrWhitespace($env:INPUT_VERSION) ) {
             $latestTag = ((gh release view --json tagName,url -R ${{ vars.REPO_SELF }}) | ConvertFrom-Json ).tagName
@@ -108,7 +109,7 @@ jobs:
             $minorValue = [Convert]::ToInt32($minorValue) + 1
             $latestTag = $latestTag.Substring(0, $lastIndex)
             
-            $releaseVersion = ('{0}.{1}', $latestTag, $minorValue)
+            $releaseVersion = ('{0}.{1}', $latestTag, $minorValue.ToString())
           }
           if ( $releaseVersion.StartsWith('v') ) {
             $releaseVersion = $releaseVersion.Substring(1)