From 90e77db999cc66353ff7569621e84d960dc067e8 Mon Sep 17 00:00:00 2001 From: Kris Bahnsen Date: Thu, 8 Aug 2024 17:57:37 -0700 Subject: [PATCH] guthub/workflows: normalize build/release workflows Matches what ufbt defaults to with minor changes Signed-off-by: Kris Bahnsen --- .github/workflows/build.yml | 39 ++++++++++++++++++++++ .github/workflows/flipperZeroAction.yml | 35 -------------------- .github/workflows/release.yml | 43 +++++++++++++++++++++++++ 3 files changed, 82 insertions(+), 35 deletions(-) create mode 100644 .github/workflows/build.yml delete mode 100644 .github/workflows/flipperZeroAction.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..b52b16a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,39 @@ +name: "FAP: Build for multiple SDK sources" +# This will build your app for dev and release channels on GitHub. +# It will also build your app every day to make sure it's up to date with the latest SDK changes. +# See https://github.com/marketplace/actions/build-flipper-application-package-fap for more information + +on: + pull_request: + schedule: + # do a build every day + - cron: "1 1 * * *" + +jobs: + ufbt-build: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: dev channel + sdk-channel: dev + - name: release channel + sdk-channel: release + # You can add unofficial channels here. See ufbt action docs for more info. + name: 'ufbt: Build for ${{ matrix.name }}' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Build with ufbt + uses: flipperdevices/flipperzero-ufbt-action@v0.1 + id: build-app + with: + sdk-channel: ${{ matrix.sdk-channel }} + - name: Upload app artifacts + uses: actions/upload-artifact@v4 + with: + # See ufbt action docs for other output variables + name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }} + path: ${{ steps.build-app.outputs.fap-artifacts }} diff --git a/.github/workflows/flipperZeroAction.yml b/.github/workflows/flipperZeroAction.yml deleted file mode 100644 index bb14257..0000000 --- a/.github/workflows/flipperZeroAction.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: "FAP: Build and lint" -on: [push, pull_request] -jobs: - ufbt-build-action: - runs-on: ubuntu-latest - name: 'ufbt: Build' - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - submodules: recursive # Ensure submodules are also checked out - - - name: Setup flipper-gblink submodule - run: git submodule update --init --recursive - - # Add any additional steps needed for the build process - # Replace this with your existing build steps - - - name: Build with ufbt GAME BOY Pokemon Trading - uses: flipperdevices/flipperzero-ufbt-action@v0.1.3 - id: build-app-gb-pokemon-trading - with: - sdk-channel: release - app-dir: ./ - - name: Upload app artifacts GAME BOY Pokemon Trading - uses: actions/upload-artifact@v3 - with: - name: ${{ github.event.repository.name }}-${{ steps.build-app-gb-pokemon-trading.outputs.suffix }} - path: ${{ steps.build-app-gb-pokemon-trading.outputs.fap-artifacts }} - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - ${{ steps.build-app-gb-pokemon-trading.outputs.fap-artifacts }} \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..9845b96 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,43 @@ +name: "FAP: Build/release for release SDK" +# This will build your app for dev and release channels on GitHub. +# It will also build your app every day to make sure it's up to date with the latest SDK changes. +# See https://github.com/marketplace/actions/build-flipper-application-package-fap for more information + +on: + workflow_dispatch: + push: + tags: + - v[0-9]+.[0-9]+ + +jobs: + ufbt-build: + runs-on: ubuntu-latest + strategy: + matrix: + include: + - name: release channel + sdk-channel: release + # You can add unofficial channels here. See ufbt action docs for more info. + name: 'ufbt: Build for ${{ matrix.name }}' + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + - name: Build with ufbt + uses: flipperdevices/flipperzero-ufbt-action@v0.1 + id: build-app + with: + sdk-channel: ${{ matrix.sdk-channel }} + - name: Upload app artifacts + uses: actions/upload-artifact@v4 + with: + # See ufbt action docs for other output variables + name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }} + path: ${{ steps.build-app.outputs.fap-artifacts }} + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + ${{ steps.build-app.outputs.fap-artifacts }}