| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- name: UFBT Build and Release
- permissions:
- contents: write
- on:
- push:
- branches:
- - main
- pull_request:
- branches:
- - main
- jobs:
- build:
- name: Build and Test Application
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v3
- - name: Set up Python
- uses: actions/setup-python@v4
- with:
- python-version: '3.x'
- - name: Install UFBT
- run: |
- python3 -m pip install --upgrade pip
- pip install ufbt
- - name: Initialize UFBT Environment
- run: |
- ufbt update
- ufbt vscode_dist
- - name: Build FAP Applications
- run: ufbt faps
- - name: Upload Build Artifacts
- uses: actions/upload-artifact@v3
- with:
- name: build-output
- path: build/
- upload-fap:
- name: Upload FAP to Existing Release
- needs: build
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- runs-on: ubuntu-latest
- steps:
- - name: Checkout Repository
- uses: actions/checkout@v3
- - name: Extract Version from Manifest
- id: extract_version
- run: |
- VERSION=$(grep '^version:' manifest.yml | awk '{print $2}')
- echo "VERSION=${VERSION}" >> $GITHUB_ENV
- - name: Upload FAP to Release
- uses: actions/upload-release-asset@v1
- with:
- upload_url: ${{ secrets.GITHUB_RELEASE_UPLOAD_URL }}
- asset_path: build/fap/metroflip-${{ env.VERSION }}.fap
- asset_name: metroflip-${{ env.VERSION }}.fap
- asset_content_type: application/octet-stream
|