소스 검색

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 }}
       ZIP_NAME: ''
       ZIP_TAG: ''
+      TGZ_NAME: ''
+      TGZ_TAG: ''
     strategy:
       fail-fast: false
       matrix:
@@ -194,20 +196,21 @@ jobs:
           }
           $ZipName = $env:ZIP_NAME
           $TgzName = $env:TGZ_NAME
-          $FapNamme = 'SubGHz_Bruteforcer.fap'
+          $FapNamme = 'subghz_bruteforcer.fap'
           $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'
               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))
-          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
-          tar zcf $TgzName  $DstFap
+          tar zcf $TgzName $DstFap
 
           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'