build&push.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. name: Build and Upload FAP to Release
  2. on:
  3. workflow_dispatch:
  4. permissions:
  5. contents: write
  6. jobs:
  7. build-and-upload:
  8. name: Build and Upload FAP
  9. runs-on: ubuntu-latest
  10. steps:
  11. - name: Checkout Repository
  12. uses: actions/checkout@v3
  13. - name: Extract Version from Manifest
  14. id: extract_version
  15. run: |
  16. VERSION=$(grep '^version:' manifest.yml | awk '{print $2}')
  17. echo "VERSION=${VERSION}" >> $GITHUB_ENV
  18. - name: Set up Python
  19. uses: actions/setup-python@v4
  20. with:
  21. python-version: '3.x'
  22. - name: Install UFBT
  23. run: |
  24. python3 -m pip install --upgrade pip
  25. pip install ufbt
  26. - name: Initialize UFBT Environment
  27. run: |
  28. ufbt update
  29. ufbt vscode_dist
  30. - name: Build FAP Applications
  31. run: ufbt faps
  32. - name: Upload Build Outputs to Release
  33. run: |
  34. gh release upload v${{ env.VERSION }} /home/runner/.ufbt/build/metroflip.fap
  35. env:
  36. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}