mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-04-10 19:15:13 +00:00
107 lines
3.8 KiB
YAML
107 lines
3.8 KiB
YAML
name: "Build ES-DE"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- retrodeck-main
|
|
- main
|
|
- feat/*
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
Set_Release_Metadata:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
branch_name: ${{ steps.set-vars.outputs.branch_name }}
|
|
date: ${{ steps.set-vars.outputs.date }}
|
|
steps:
|
|
- name: Set Branch and Date
|
|
id: set-vars
|
|
run: |
|
|
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}")
|
|
DATE=$(date +'%d%m%y.%S')
|
|
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
|
|
echo "date=$DATE" >> $GITHUB_OUTPUT
|
|
|
|
Building_RetroDECK-ES-DE:
|
|
runs-on: ubuntu-latest
|
|
needs: Set_Release_Metadata
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'recursive'
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
fetch-depth: 1
|
|
|
|
- name: Install dependencies
|
|
run: curl "https://raw.githubusercontent.com/RetroDECK/components-template/main/automation_tools/install_dependencies.sh" | bash
|
|
|
|
- name: Pre-build automation
|
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
|
|
|
|
- name: Build flatpak
|
|
run: |
|
|
git config --global protocol.file.allow always
|
|
flatpak-builder --user --force-clean \
|
|
--install-deps-from=flathub \
|
|
--install-deps-from=flathub-beta \
|
|
--repo=${GITHUB_WORKSPACE}/es-de-repo \
|
|
"${GITHUB_WORKSPACE}/es-de-build-dir" \
|
|
net.retrodeck.es-de.yml
|
|
|
|
- name: Package flatpak artifact
|
|
run: |
|
|
tar -czf RetroDECK-ES-DE-Artifact.tar.gz -C es-de-build-dir .
|
|
tree -H ./ > tree.html
|
|
|
|
- name: Upload flatpak to GitHub Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: "${{ needs.Set_Release_Metadata.outputs.branch_name }}-${{ needs.Set_Release_Metadata.outputs.date }}"
|
|
name: "${{ needs.Set_Release_Metadata.outputs.branch_name }} Build"
|
|
body: |
|
|
Build of RetroDECK ES-DE from `${{ github.repository }}@${{ github.sha }}`
|
|
- Branch: [${{ needs.Set_Release_Metadata.outputs.branch_name }}](https://github.com/${{ github.repository }}/tree/${{ needs.Set_Release_Metadata.outputs.branch_name }})
|
|
artifacts: |
|
|
RetroDECK-ES-DE-Artifact.tar.gz
|
|
tree.html
|
|
allowUpdates: true
|
|
makeLatest: ${{ contains(needs.Set_Release_Metadata.outputs.branch_name, 'feat/') && 'false' || 'true' }}
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
|
|
Create_AppImage_RetroDECK:
|
|
runs-on: ubuntu-latest
|
|
needs: Set_Release_Metadata
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
submodules: 'recursive'
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
fetch-depth: 1
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libpipewire-0.3-dev
|
|
|
|
- name: Build AppImage
|
|
run: |
|
|
chmod +x tools/create_AppImage_RetroDECK.sh
|
|
./tools/create_AppImage_RetroDECK.sh
|
|
|
|
- name: Upload AppImage to GitHub Release
|
|
uses: ncipollo/release-action@v1
|
|
with:
|
|
tag: "${{ needs.Set_Release_Metadata.outputs.branch_name }}-${{ needs.Set_Release_Metadata.outputs.date }}"
|
|
name: "${{ needs.Set_Release_Metadata.outputs.branch_name }} Build"
|
|
body: |
|
|
AppImage build for RetroDECK.
|
|
Branch: [${{ needs.Set_Release_Metadata.outputs.branch_name }}](https://github.com/${{ github.repository }}/tree/${{ needs.Set_Release_Metadata.outputs.branch_name }})
|
|
artifacts: |
|
|
RetroDECK-AppImage.tar.gz
|
|
allowUpdates: true
|
|
makeLatest: ${{ contains(needs.Set_Release_Metadata.outputs.branch_name, 'feat/') && 'false' || 'true' }}
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|