From f5fe883d491200828bee314d8d7f8c517bfd5a22 Mon Sep 17 00:00:00 2001 From: MacRimi <123239993+MacRimi@users.noreply.github.com> Date: Wed, 18 Mar 2026 11:11:05 +0100 Subject: [PATCH] Enhance AppImage workflow to include checksum upload Updated the workflow to upload both AppImage and checksum artifacts, and modified the commit process to use the current branch instead of main. --- .github/workflows/build-appimage-manual.yml | 34 ++++++++++++--------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-appimage-manual.yml b/.github/workflows/build-appimage-manual.yml index 25f0a3d1..6d4b2d48 100644 --- a/.github/workflows/build-appimage-manual.yml +++ b/.github/workflows/build-appimage-manual.yml @@ -47,13 +47,6 @@ jobs: id: version working-directory: AppImage run: echo "VERSION=$(node -p "require('./package.json').version")" >> $GITHUB_OUTPUT - - - name: Upload AppImage artifact - uses: actions/upload-artifact@v5 - with: - name: ProxMenux-${{ steps.version.outputs.VERSION }}-AppImage - path: AppImage/dist/*.AppImage - retention-days: 30 - name: Generate SHA256 checksum run: | @@ -62,21 +55,32 @@ jobs: echo "Generated SHA256:" cat ProxMenux-Monitor.AppImage.sha256 - - name: Upload AppImage and checksum to /AppImage folder in main + - name: Upload AppImage artifact + uses: actions/upload-artifact@v5 + with: + name: ProxMenux-${{ steps.version.outputs.VERSION }}-AppImage + path: | + AppImage/dist/*.AppImage + AppImage/dist/*.sha256 + retention-days: 30 + + - name: Commit AppImage to current branch env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + CURRENT_BRANCH="${{ github.ref_name }}" + git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" - git fetch origin main - git checkout main + git fetch origin "$CURRENT_BRANCH" + git worktree add /tmp/target-branch origin/"$CURRENT_BRANCH" - rm -f AppImage/*.AppImage AppImage/*.sha256 || true - - cp AppImage/dist/*.AppImage AppImage/ - cp AppImage/dist/ProxMenux-Monitor.AppImage.sha256 AppImage/ + rm -f /tmp/target-branch/AppImage/*.AppImage /tmp/target-branch/AppImage/*.sha256 || true + cp AppImage/dist/*.AppImage /tmp/target-branch/AppImage/ + cp AppImage/dist/ProxMenux-Monitor.AppImage.sha256 /tmp/target-branch/AppImage/ + cd /tmp/target-branch git add AppImage/*.AppImage AppImage/*.sha256 git commit -m "Update AppImage build ($(date +'%Y-%m-%d %H:%M:%S'))" || echo "No changes to commit" - git push origin main + git push origin HEAD:"$CURRENT_BRANCH"