2024-07-19 07:07:50 +00:00
|
|
|
name: "Build ES-DE"
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- retrodeck-main
|
2024-08-02 03:46:32 +00:00
|
|
|
- main
|
2024-08-02 02:47:48 +00:00
|
|
|
- feat/*
|
2024-07-19 07:07:50 +00:00
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
Building_RetroDECK-ES-DE:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
|
2024-08-02 02:47:48 +00:00
|
|
|
- name: Clone RetroDECK repo
|
2024-07-19 07:07:50 +00:00
|
|
|
uses: actions/checkout@v3
|
|
|
|
with:
|
2024-08-02 07:27:05 +00:00
|
|
|
submodules: 'recursive'
|
2024-07-19 07:07:50 +00:00
|
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
2024-08-02 02:47:48 +00:00
|
|
|
fetch-depth: 1
|
2024-07-19 07:07:50 +00:00
|
|
|
|
|
|
|
- name: "Install dependencies"
|
|
|
|
run: "automation_tools/install_dependencies.sh"
|
|
|
|
|
2024-09-25 01:10:46 +00:00
|
|
|
- name: Run pre-build automation tasks
|
|
|
|
run : "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/pre_build_automation.sh"
|
|
|
|
|
2024-07-19 07:07:50 +00:00
|
|
|
- name: "Creating ES-DE manifest"
|
|
|
|
run: "/bin/bash ${GITHUB_WORKSPACE}/automation_tools/update_es-de_manifest.sh"
|
|
|
|
|
|
|
|
- name: "[DEBUG] Outputting manifest"
|
|
|
|
run: cat net.retrodeck.es-de.yml
|
|
|
|
|
|
|
|
- name: "Build flatpak"
|
|
|
|
id: "flatpak-download"
|
|
|
|
run: |
|
2024-07-19 12:37:20 +00:00
|
|
|
git config --global protocol.file.allow always
|
2024-07-19 07:07:50 +00:00
|
|
|
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: "Exporting dir tree"
|
|
|
|
id: tree
|
|
|
|
run: tree -H ./ > ${GITHUB_WORKSPACE}/tree.html
|
|
|
|
|
|
|
|
- name: Create Artifact for RetroDECK
|
|
|
|
run: |
|
|
|
|
tar -czf ${GITHUB_WORKSPACE}/RetroDECK-ES-DE-Artifact.tar.gz -C ${GITHUB_WORKSPACE}/es-de-build-dir .
|
|
|
|
hash=($(sha256sum ${GITHUB_WORKSPACE}/RetroDECK-ES-DE-Artifact.tar.gz))
|
|
|
|
echo $hash > ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.sha
|
|
|
|
mv -f RetroDECK-Artifact-cooker.* ${{ secrets.ARTIFACT_REPO }}
|
|
|
|
continue-on-error: true
|
|
|
|
timeout-minutes: 1440
|
|
|
|
|
|
|
|
- name: Set environment variable with current branch name
|
|
|
|
run: echo "GITHUB_REF_SLUG=$(git rev-parse --abbrev-ref HEAD)" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Get branch name
|
|
|
|
id: branch_name
|
|
|
|
run: echo "BRANCH_NAME=$(echo $GITHUB_REF | sed 's|refs/heads/||')" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Get date
|
|
|
|
id: date
|
|
|
|
run: echo "DATE=$(date +'%d%m%y.%S')" >> $GITHUB_ENV
|
|
|
|
|
|
|
|
- name: Publish the artifacts in a release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
tag: "${{env.BRANCH_NAME}}-${{env.DATE}}"
|
|
|
|
body: |
|
|
|
|
# Release Notes
|
|
|
|
These are the artifact of RetroDECK ES-DE, commit: ${{ github.event.repository.full_name }}@${{github.sha}}.
|
2024-07-20 13:13:21 +00:00
|
|
|
On branch [${{env.BRANCH_NAME}}](https://github.com/RetroDECK/ES-DE/tree/${{env.BRANCH_NAME}}).
|
2024-07-19 07:07:50 +00:00
|
|
|
|
|
|
|
artifacts: "RetroDECK-ES-DE-Artifact.tar.gz, tree.html"
|
|
|
|
allowUpdates: true
|
2024-08-02 02:47:48 +00:00
|
|
|
makeLatest: ${{ contains(env.BRANCH_NAME, 'feat/') && 'false' || 'true' }}
|
2024-07-19 07:07:50 +00:00
|
|
|
token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
|
|
continue-on-error: true
|
|
|
|
|
2024-08-02 11:06:33 +00:00
|
|
|
# - name: Clone Cooker repo
|
|
|
|
# if: contains(env.BRANCH_NAME, 'feat/') == false
|
|
|
|
# uses: actions/checkout@v3
|
|
|
|
# with:
|
|
|
|
# repository: RetroDECK/RetroDECK
|
|
|
|
# #ref: cooker
|
|
|
|
# ref: feat/lighter-manifest # TODO: put cooker when this is merged
|
|
|
|
# submodules: 'recursive'
|
|
|
|
# token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
|
|
|
|
# path: cooker
|
|
|
|
|
|
|
|
# - name: "Update RetroDECK Cooker manifest with new artifact URL and SHA256"
|
|
|
|
# if: contains(env.BRANCH_NAME, 'feat/') == false
|
|
|
|
# run: |
|
|
|
|
# NEW_URL="https://github.com/RetroDECK/ES-DE/releases/download/${{env.BRANCH_NAME}}-${{env.DATE}}/RetroDECK-ES-DE-Artifact.tar.gz"
|
|
|
|
# NEW_SHA256=$(cat ${GITHUB_WORKSPACE}/RetroDECK-Artifact-cooker.sha)
|
|
|
|
|
|
|
|
# yq e -i '.modules[] | select(.name == "ES-DE") | .sources[0].url = strenv(NEW_URL)' cooker/net.retrodeck.retrodeck.yml
|
|
|
|
# yq e -i '.modules[] | select(.name == "ES-DE") | .sources[0].sha256 = strenv(NEW_SHA256)' cooker/net.retrodeck.retrodeck.yml
|
|
|
|
|
|
|
|
# - name: Commit and push changes to Cooker repo
|
|
|
|
# if: contains(env.BRANCH_NAME, 'feat/') == false
|
|
|
|
# run: |
|
|
|
|
# cd "${GITHUB_WORKSPACE}/cooker"
|
|
|
|
# git config user.name "GitHub Actions"
|
|
|
|
# git config user.email "actions@github.com"
|
|
|
|
# git add net.retrodeck.retrodeck.yml
|
|
|
|
# git commit -m "ES-DE: updated module with new artifact URL and SHA256 [skip ci]"
|
|
|
|
# git push origin HEAD
|
2024-07-19 07:07:50 +00:00
|
|
|
|