Skip to content

Build and Upload FAP to Release #7

Build and Upload FAP to Release

Build and Upload FAP to Release #7

Workflow file for this run

name: Upload FAP
on:
workflow_dispatch:
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up dependencies
run: |
sudo apt-get install gh
echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Build FAP
run: |
# Build command here
echo "Build completed"
- name: Delete existing asset if it exists
run: |
ASSET_ID=$(gh api repos/luu176/Metroflip/releases/192702667/assets | jq '.[] | select(.name=="metroflip.fap") | .id')
if [ -n "$ASSET_ID" ]; then
echo "Deleting existing asset with ID $ASSET_ID"
gh api --method DELETE repos/luu176/Metroflip/releases/assets/$ASSET_ID
fi
- name: Upload FAP
uses: actions/upload-release-asset@v1
with:
upload_url: https://uploads.github.com/repos/luu176/Metroflip/releases/192702667/assets
asset_path: /home/runner/.ufbt/build/metroflip.fap
asset_name: metroflip.fap
asset_content_type: application/octet-stream