|
@@ -9,7 +9,7 @@ on:
|
|
|
required: false
|
|
required: false
|
|
|
type: string
|
|
type: string
|
|
|
release:
|
|
release:
|
|
|
- types: [created]
|
|
|
|
|
|
|
+ types: [created,prereleased]
|
|
|
push:
|
|
push:
|
|
|
paths:
|
|
paths:
|
|
|
- .github/workflows/build-with-firmware.yml
|
|
- .github/workflows/build-with-firmware.yml
|
|
@@ -31,6 +31,10 @@ jobs:
|
|
|
RELATIVE_PATH: "applications/external/subbrute"
|
|
RELATIVE_PATH: "applications/external/subbrute"
|
|
|
CURRENT_VERSION: ${{ vars.RELEASE_VERSION }}
|
|
CURRENT_VERSION: ${{ vars.RELEASE_VERSION }}
|
|
|
RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
|
|
RELEASE_VERSION: ${{ vars.RELEASE_VERSION }}
|
|
|
|
|
+ ZIP_NAME: ''
|
|
|
|
|
+ ZIP_TAG: ''
|
|
|
|
|
+ TGZ_NAME: ''
|
|
|
|
|
+ TGZ_TAG: ''
|
|
|
strategy:
|
|
strategy:
|
|
|
fail-fast: false
|
|
fail-fast: false
|
|
|
matrix:
|
|
matrix:
|
|
@@ -53,7 +57,7 @@ jobs:
|
|
|
$ReleaseVersion = ([string]::IsNullOrWhitespace($env:INPUT_VERSION) ? $env:CURRENT_VERSION : $env:INPUT_VERSION)
|
|
$ReleaseVersion = ([string]::IsNullOrWhitespace($env:INPUT_VERSION) ? $env:CURRENT_VERSION : $env:INPUT_VERSION)
|
|
|
Write-Output ('RELEASE_VERSION={0}' -f $ReleaseVersion) >> $env:GITHUB_ENV
|
|
Write-Output ('RELEASE_VERSION={0}' -f $ReleaseVersion) >> $env:GITHUB_ENV
|
|
|
|
|
|
|
|
- - name: Copy Repo Files
|
|
|
|
|
|
|
+ - name: Copy Firmware Files
|
|
|
uses: actions/checkout@v3
|
|
uses: actions/checkout@v3
|
|
|
with:
|
|
with:
|
|
|
repository: "${{ matrix.url }}"
|
|
repository: "${{ matrix.url }}"
|
|
@@ -132,6 +136,19 @@ jobs:
|
|
|
# # An explicit key for restoring and saving the cache
|
|
# # An explicit key for restoring and saving the cache
|
|
|
# key: 'fbt=${{ env.FIRMWARE_VERSION }}'
|
|
# key: 'fbt=${{ env.FIRMWARE_VERSION }}'
|
|
|
#
|
|
#
|
|
|
|
|
+ - name: Remove other apps
|
|
|
|
|
+ shell: bash
|
|
|
|
|
+ if: ${{ success() }}
|
|
|
|
|
+ # rm to remove problem FAP which includes non existent files
|
|
|
|
|
+ run: |
|
|
|
|
|
+ rm -Rf ./applications/debug ./applications/examples
|
|
|
|
|
+ mkdir ./tmp
|
|
|
|
|
+ mv ./applications/external/application.fam ./tmp/
|
|
|
|
|
+ mv -f ./applications/external/subbrute/ ./tmp/
|
|
|
|
|
+ rm -Rf ./applications/external/*
|
|
|
|
|
+ mv -f ./tmp/* ./applications/external/
|
|
|
|
|
+ rm -Rf ./tmp/
|
|
|
|
|
+
|
|
|
- name: Build Firmware
|
|
- name: Build Firmware
|
|
|
shell: bash
|
|
shell: bash
|
|
|
if: ${{ success() }}
|
|
if: ${{ success() }}
|
|
@@ -140,7 +157,18 @@ jobs:
|
|
|
DIST_SUFFIX: ${{ matrix.version }}
|
|
DIST_SUFFIX: ${{ matrix.version }}
|
|
|
WORKFLOW_BRANCH_OR_TAG: release-cfw
|
|
WORKFLOW_BRANCH_OR_TAG: release-cfw
|
|
|
run: |
|
|
run: |
|
|
|
- ./fbt COMPACT=1 DEBUG=0 fap_dist
|
|
|
|
|
|
|
+ ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0
|
|
|
|
|
+
|
|
|
|
|
+ - name: Build FAPs
|
|
|
|
|
+ shell: bash
|
|
|
|
|
+ if: ${{ success() }}
|
|
|
|
|
+ env:
|
|
|
|
|
+ FBT_NO_SYNC: 0
|
|
|
|
|
+ DIST_SUFFIX: ${{ matrix.version }}
|
|
|
|
|
+ WORKFLOW_BRANCH_OR_TAG: release-cfw
|
|
|
|
|
+ # rm to remove problem FAP which includes non existent files
|
|
|
|
|
+ run: |
|
|
|
|
|
+ ./fbt COMPACT=1 DEBUG=0 FBT_NO_SYNC=0 fap_dist
|
|
|
|
|
|
|
|
# - name: Save FBT
|
|
# - name: Save FBT
|
|
|
# id: cache-save
|
|
# id: cache-save
|
|
@@ -180,20 +208,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'
|
|
@@ -207,13 +236,15 @@ jobs:
|
|
|
Write-Output ('TGZ_NAME={0}' -f $TgzName ) >> $env:GITHUB_ENV
|
|
Write-Output ('TGZ_NAME={0}' -f $TgzName ) >> $env:GITHUB_ENV
|
|
|
Write-Output ('ZIP_TAG={0} ({1})' -f $ZipName, $ZipSize) >> $env:GITHUB_ENV
|
|
Write-Output ('ZIP_TAG={0} ({1})' -f $ZipName, $ZipSize) >> $env:GITHUB_ENV
|
|
|
Write-Output ('TGZ_TAG={0} ({1})' -f $TgzName , $TgzSize) >> $env:GITHUB_ENV
|
|
Write-Output ('TGZ_TAG={0} ({1})' -f $TgzName , $TgzSize) >> $env:GITHUB_ENV
|
|
|
- - name: Create assets
|
|
|
|
|
|
|
+
|
|
|
|
|
+ - name: Upload assets
|
|
|
if: ${{ success() && env.ZIP_NAME != '' }}
|
|
if: ${{ success() && env.ZIP_NAME != '' }}
|
|
|
env:
|
|
env:
|
|
|
GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
|
|
GITHUB_TOKEN: ${{ secrets.FLIPPER_TOKEN }}
|
|
|
run: |
|
|
run: |
|
|
|
- gh release upload 'v${{ env.RELEASE_VERSION }}' --clobber \
|
|
|
|
|
- '${{ env.ZIP_NAME }}#${{ env.ZIP_TAG }}' '${{ env.TGZ_NAME }}#${{ env.TGZ_TAG }}' -R ${{ env.REPO_SELF }}
|
|
|
|
|
|
|
+ gh release create v${{ env.RELEASE_VERSION }} --generate-notes --draft -R ${{ env.REPO_SELF }}
|
|
|
|
|
+ gh release upload 'v${{ env.RELEASE_VERSION }}' '${{ env.ZIP_NAME }}#${{ env.ZIP_TAG }}' \
|
|
|
|
|
+ '${{ env.TGZ_NAME }}#${{ env.TGZ_TAG }}' --clobber -R ${{ env.REPO_SELF }}
|
|
|
gh release edit 'v${{ env.RELEASE_VERSION }}' --draft=false -R ${{ env.REPO_SELF }}
|
|
gh release edit 'v${{ env.RELEASE_VERSION }}' --draft=false -R ${{ env.REPO_SELF }}
|
|
|
|
|
|
|
|
#EOF
|
|
#EOF
|