1- name : " FAP: Build for multiple SDK sources"
2- # This will build your app for dev and release channels on GitHub.
3- # It will also build your app every day to make sure it's up to date with the latest SDK changes.
4- # See https://github.com/marketplace/actions/build-flipper-application-package-fap for more information
1+ name : Build
52
63on :
74 push :
8- # # put your main branch name under "branches"
9- # branches:
10- # - master
5+ branches :
6+ - master
117 pull_request :
12- schedule :
13- # do a build every day
8+ schedule :
149 - cron : " 1 1 * * *"
1510
1611jobs :
@@ -23,19 +18,64 @@ jobs:
2318 sdk-channel : dev
2419 - name : release channel
2520 sdk-channel : release
26- # You can add unofficial channels here. See ufbt action docs for more info.
27- name : ' ufbt: Build for ${{ matrix.name }}'
21+ name : " Build for ${{ matrix.name }}"
2822 steps :
2923 - name : Checkout
3024 uses : actions/checkout@v4
25+
3126 - name : Build with ufbt
3227 uses : flipperdevices/flipperzero-ufbt-action@v0.1
3328 id : build-app
3429 with :
3530 sdk-channel : ${{ matrix.sdk-channel }}
31+
3632 - name : Upload app artifacts
37- uses : actions/upload-artifact@v3
33+ uses : actions/upload-artifact@v4
3834 with :
39- # See ufbt action docs for other output variables
4035 name : ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }}
4136 path : ${{ steps.build-app.outputs.fap-artifacts }}
37+
38+ lint :
39+ runs-on : ubuntu-latest
40+ name : Lint
41+ steps :
42+ - name : Checkout
43+ uses : actions/checkout@v4
44+
45+ - name : Lint with ufbt
46+ uses : flipperdevices/flipperzero-ufbt-action@v0.1
47+ with :
48+ task : lint
49+
50+ release :
51+ if : github.event_name == 'push' && github.ref == 'refs/heads/master'
52+ needs : [ufbt-build, lint]
53+ runs-on : ubuntu-latest
54+ permissions :
55+ contents : write
56+ name : Release
57+ steps :
58+ - name : Checkout
59+ uses : actions/checkout@v4
60+
61+ - name : Build release FAP
62+ uses : flipperdevices/flipperzero-ufbt-action@v0.1
63+ id : build-release
64+ with :
65+ sdk-channel : release
66+
67+ - name : Get version
68+ id : version
69+ run : |
70+ VERSION=$(grep 'fap_version=' application.fam | sed 's/.*"\(.*\)".*/\1/')
71+ SHA_SHORT=$(git rev-parse --short HEAD)
72+ echo "tag=v${VERSION}-${SHA_SHORT}" >> "$GITHUB_OUTPUT"
73+ echo "name=OpenShock Flipper Zero v${VERSION}" >> "$GITHUB_OUTPUT"
74+
75+ - name : Create release
76+ uses : softprops/action-gh-release@v2
77+ with :
78+ tag_name : ${{ steps.version.outputs.tag }}
79+ name : ${{ steps.version.outputs.name }}
80+ files : ${{ steps.build-release.outputs.fap-artifacts }}/*
81+ generate_release_notes : true
0 commit comments