PIPELINES: added flatpak file sha for both main and cooker + gitea

This commit is contained in:
XargonWan 2024-05-03 22:29:06 +02:00
parent 59309d5dce
commit 59742bfcbf
3 changed files with 19 additions and 2 deletions

View file

@ -152,7 +152,7 @@ jobs:
Cooker channel is provided for the community to test fixes and explore new functionality. 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. 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 allowUpdates: true
makeLatest: ${{env.MAKE_LATEST}} # if it's a feat branch is not considered the latest build makeLatest: ${{env.MAKE_LATEST}} # if it's a feat branch is not considered the latest build
token: ${{ secrets.TRIGGER_BUILD_TOKEN }} token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
@ -205,6 +205,13 @@ jobs:
# -F "attachment=@RetroDECK-cooker.flatpak" \ # -F "attachment=@RetroDECK-cooker.flatpak" \
# "http://$GITEA_HOST/api/v1/repos/$ORGANIZATION/$REPO/releases/$release_id/assets?name=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 \ # curl -X POST \
# -H "Authorization: token ${GITEA_TOKEN}" \ # -H "Authorization: token ${GITEA_TOKEN}" \
# -H "Content-Type: multipart/form-data" \ # -H "Content-Type: multipart/form-data" \

View file

@ -108,7 +108,7 @@ jobs:
tag: ${{ env.REL_VER }} tag: ${{ env.REL_VER }}
name: "RetroDECK v${{ env.REL_VER }}" name: "RetroDECK v${{ env.REL_VER }}"
bodyFile: "body.md" bodyFile: "body.md"
artifacts: "RetroDECK.flatpak,RetroDECK-Artifact.tar.gz" artifacts: "RetroDECK.flatpak,RetroDECK.flatpak.sha,RetroDECK-Artifact.tar.gz"
allowUpdates: true allowUpdates: true
makeLatest: true makeLatest: true
token: ${{ secrets.TRIGGER_BUILD_TOKEN }} token: ${{ secrets.TRIGGER_BUILD_TOKEN }}
@ -147,3 +147,11 @@ jobs:
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TRIGGER_BUILD_TOKEN }} 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 }}

View file

@ -4,6 +4,8 @@
if [ "${GITHUB_REF##*/}" = "main" ]; then if [ "${GITHUB_REF##*/}" = "main" ]; then
flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK.flatpak" net.retrodeck.retrodeck flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK.flatpak" net.retrodeck.retrodeck
sha256sum RetroDECK.flatpak > RetroDECK.flatpak.sha
else else
flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK-cooker.flatpak" net.retrodeck.retrodeck flatpak build-bundle "${GITHUB_WORKSPACE}/.local" "$GITHUB_WORKSPACE/RetroDECK-cooker.flatpak" net.retrodeck.retrodeck
sha256sum RetroDECK-cooker.flatpak > RetroDECK-cooker.flatpak.sha
fi fi