Update build.yml #192
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "FAP: Build for multiple SDK sources" | |
on: | |
push: | |
branches: | |
- master | |
- main | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
ufbt-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- name: release channel | |
sdk-channel: release | |
name: 'ufbt: Build for ${{ matrix.name }}' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build with ufbt | |
uses: flipperdevices/[email protected] | |
id: build-app | |
with: | |
sdk-channel: ${{ matrix.sdk-channel }} | |
- name: Upload app artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: release-build | |
path: ./artifacts | |
download-and-release: | |
needs: ufbt-build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download app artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
name: release-build | |
path: ./artifacts # Directory where the artifact will be saved | |
- name: List files in the artifact directory | |
run: | | |
echo "Listing the files in the ./artifacts directory:" | |
ls -lh ./artifacts # List files in the downloaded directory to find the actual file name | |
- name: Unzip artifact | |
run: | | |
# Dynamically find the actual tarball file and unzip | |
artifact_file=$(ls ./artifacts/*.tar.gz) # Assuming the artifact is a .tar.gz file | |
echo "Unzipping the file: $artifact_file" | |
mkdir -p ./unzipped | |
tar -xvf $artifact_file -C ./unzipped # Unzip the file | |
- name: Create a draft release | |
id: create_release | |
uses: actions/create-release@v1 | |
with: | |
tag_name: 'v1.0.0' # You can change this to a dynamic version if needed | |
release_name: 'Release v1.0.0' | |
draft: true | |
prerelease: false | |
body: | | |
### Release | |
This is an automated release of the Lego Dimensions ToyPad Emulator app for the Flipper Zero. | |
- This release includes the official flipper zero release channel build of the app | |
### Release Notes | |
Place release notes here. | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Upload release assets | |
uses: ncipollo/release-action@v1 | |
with: | |
artifacts: ./unzipped/* # Path to the unzipped files | |
tag: 'v1.0.0' # Make sure the tag matches the one used in create-release | |