Skip to content

Migrate to new ufbt #17

Migrate to new ufbt

Migrate to new ufbt #17

Workflow file for this run

name: main
on:
workflow_dispatch:
push:
branches:
- master
tags:
- v*.*.*
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: app
strategy:
matrix:
include:
- channel: dev
experimental: true
- channel: rc
experimental: true
- channel: release
experimental: false
continue-on-error: ${{ github.event.pull_request != null && github.event.pull_request.draft || matrix.experimental }}
steps:
- uses: actions/checkout@v3
with:
path: app
- uses: actions/setup-python@v4
with:
python-version: '3.x'
- run: |
pip install ufbt
- uses: actions/cache@v3
id: cache-ufbt
with:
path: .ufbt
key: ${{ runner.os }}-${{ matrix.channel }}-ufbt
- run: |
ufbt update --channel=${{ matrix.channel }}
- run: |
ufbt
- uses: actions/upload-artifact@v3
with:
name: app.${{ matrix.channel }}
if-no-files-found: error
path: |
app/dist/*.fap
.ufbt/current/ufbt_state.json
release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
needs: [build]
steps:
- uses: actions/download-artifact@v3
with:
name: app.release
- run: |
echo "SDK_STATE=$(awk 1 ORS='' .ufbt/current/ufbt_state.json)" >> $GITHUB_ENV
- run: |
echo "Flipper firmware version: ${{ fromJson(env.SDK_STATE).meta.version }}" >> release.txt
- uses: softprops/action-gh-release@v1
with:
files: |
app/dist/*.fap
draft: true
body_path: release.txt
append_body: true
generate_release_notes: true