From 59742bfcbf3eb853bee906e7f9ba832754b234f7 Mon Sep 17 00:00:00 2001 From: XargonWan Date: Fri, 3 May 2024 22:29:06 +0200 Subject: [PATCH] PIPELINES: added flatpak file sha for both main and cooker + gitea --- .github/workflows/cooker-selfhosted.yml | 9 ++++++++- .github/workflows/main-selfhosted.yml | 10 +++++++++- automation_tools/flatpak_build_bundle.sh | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cooker-selfhosted.yml b/.github/workflows/cooker-selfhosted.yml index 241ca33b..4ffb693a 100644 --- a/.github/workflows/cooker-selfhosted.yml +++ b/.github/workflows/cooker-selfhosted.yml @@ -152,7 +152,7 @@ jobs: Cooker channel is provided for the community to test fixes and explore new functionality. Please DO NOT open issues or ask support on this build. - artifacts: "RetroDECK-cooker.flatpak,RetroDECK-Artifact.tar.gz" + artifacts: "RetroDECK-cooker.flatpak,RetroDECK-cooker.flatpak.sha,RetroDECK-Artifact.tar.gz" allowUpdates: true makeLatest: ${{env.MAKE_LATEST}} # if it's a feat branch is not considered the latest build token: ${{ secrets.TRIGGER_BUILD_TOKEN }} @@ -205,6 +205,13 @@ jobs: # -F "attachment=@RetroDECK-cooker.flatpak" \ # "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak" + # # Upload artifacts sha + # curl -X POST \ + # -H "Authorization: token ${GITEA_TOKEN}" \ + # -H "Content-Type: multipart/form-data" \ + # -F "attachment=@RetroDECK-cooker.flatpak.sha" \ + # "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=RetroDECK-cooker.flatpak.sha" + # curl -X POST \ # -H "Authorization: token ${GITEA_TOKEN}" \ # -H "Content-Type: multipart/form-data" \ diff --git a/.github/workflows/main-selfhosted.yml b/.github/workflows/main-selfhosted.yml index bd335618..567aec26 100644 --- a/.github/workflows/main-selfhosted.yml +++ b/.github/workflows/main-selfhosted.yml @@ -108,7 +108,7 @@ jobs: tag: ${{ env.REL_VER }} name: "RetroDECK v${{ env.REL_VER }}" bodyFile: "body.md" - artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz" + artifacts: "RetroDECK.flatpak,RetroDECK.flatpak.sha,RetroDECK-Artifact.tar.gz" allowUpdates: true makeLatest: true token: ${{ secrets.TRIGGER_BUILD_TOKEN }} @@ -147,3 +147,11 @@ jobs: env: GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }} + - name: Upload RetroDECK.flatpak.sha to Gitea Release + run: | + curl -X POST \ + -H "Authorization: token ${GITEA_TOKEN}" \ + -F "file=@RetroDECK.flatpak.sha" \ + "https://repo.retrodeck.net/RetroDECK/RetroDECK/releases/${{ env.REL_VER }}/assets?name=RetroDECK.flatpak.sha" + env: + GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }} diff --git a/automation_tools/flatpak_build_bundle.sh b/automation_tools/flatpak_build_bundle.sh index 3568ebb7..8e79186f 100755 --- a/automation_tools/flatpak_build_bundle.sh +++ b/automation_tools/flatpak_build_bundle.sh @@ -4,6 +4,8 @@ if [ "${GITHUB_REF##*/}" = "main" ]; then flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK.flatpak" net.retrodeck.retrodeck + sha256sum RetroDECK.flatpak > RetroDECK.flatpak.sha else flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK-cooker.flatpak" net.retrodeck.retrodeck + sha256sum RetroDECK-cooker.flatpak > RetroDECK-cooker.flatpak.sha fi \ No newline at end of file