Преглед изворни кода

change: refactor step 'Create assets'

Signed-off-by: DerSkythe <skif@skif.ws>
DerSkythe пре 2 година
родитељ
комит
622b5fb4f6
1 измењених фајлова са 8 додато и 5 уклоњено
  1. 8 5
      .github/workflows/build-with-firmwware.yml

+ 8 - 5
.github/workflows/build-with-firmwware.yml

@@ -33,6 +33,8 @@ jobs:
       RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
       RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
       ZIP_NAME: ''
       ZIP_NAME: ''
       ZIP_TAG: ''
       ZIP_TAG: ''
+      TGZ_NAME: ''
+      TGZ_TAG: ''
     strategy:
     strategy:
       fail-fast: false
       fail-fast: false
       matrix:
       matrix:
@@ -194,20 +196,21 @@ jobs:
           }
           }
           $ZipName = $env:ZIP_NAME
           $ZipName = $env:ZIP_NAME
           $TgzName = $env:TGZ_NAME
           $TgzName = $env:TGZ_NAME
-          $FapNamme = 'SubGHz_Bruteforcer.fap'
+          $FapNamme = 'subghz_bruteforcer.fap'
           $DstFap = "./$FapNamme"
           $DstFap = "./$FapNamme"
+          $AppDir = "dist/f7-C/apps/Sub-GHz"
 
 
-          if (!(Test-Path -Path "dist/f7-C/apps/Sub-GHz/$FapNamme" -PathType Leaf)) {
+          if (!(Test-Path -Path "$AppDir/$FapNamme" -PathType Leaf)) {
               Write-Error '::error title=Files not found::Cannot find files in location'
               Write-Error '::error title=Files not found::Cannot find files in location'
               exit 1
               exit 1
           }
           }
 
 
-          $Size = (Get-Item -Path "dist/f7-C/apps/Sub-GHz/$FapNamme" | Get-ItemPropertyValue -Name Length)
+          $Size = (Get-Item -Path "$AppDir/$FapNamme" | Get-ItemPropertyValue -Name Length)
           Write-Output ('Filesize: {0}' -f (Format-Bytes $Size))
           Write-Output ('Filesize: {0}' -f (Format-Bytes $Size))
-          Copy-Item -Force -Path "dist/f7-C/apps/Sub-GHz/$FapNamme" -Destination $DstFap
+          Copy-Item -Force -Verbose -Path "$AppDir/$FapNamme" -Destination $DstFap
 
 
           zip -r -qq $ZipName $DstFap
           zip -r -qq $ZipName $DstFap
-          tar zcf $TgzName  $DstFap
+          tar zcf $TgzName $DstFap
 
 
           if ( !(Test-Path -Path $ZipName -PathType Leaf) -or !(Test-Path -Path $TgzName -PathType Leaf) ) {
           if ( !(Test-Path -Path $ZipName -PathType Leaf) -or !(Test-Path -Path $TgzName -PathType Leaf) ) {
               Write-Error '::error title=Files not found::Cannot find files in location'
               Write-Error '::error title=Files not found::Cannot find files in location'