From 0928f518cf6d7e787b29ed4e7b3e4a32e89bc470 Mon Sep 17 00:00:00 2001 From: itsMeRaj69 Date: Sun, 20 Jul 2025 03:01:11 +0530 Subject: [PATCH] Updated trigger_release.yml --- .github/workflows/trigger_release.yml | 113 ++++++++++++++++++++++++++ 1 file changed, 113 insertions(+) create mode 100644 .github/workflows/trigger_release.yml diff --git a/.github/workflows/trigger_release.yml b/.github/workflows/trigger_release.yml new file mode 100644 index 000000000..90abdd8d1 --- /dev/null +++ b/.github/workflows/trigger_release.yml @@ -0,0 +1,113 @@ +name: Build Application and Make Release + +on: + push: + tags: + - "*" + workflow_dispatch: + + +jobs: + build_release: + name: Build Release + uses: ./.github/workflows/build.yml + with: + build-type: Release + secrets: inherit + + create_release: + needs: build_release + runs-on: ubuntu-latest + outputs: + upload_url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: "true" + path: "PrismLauncher-source" + - name: Download artifacts + uses: actions/download-artifact@v4 + - name: Grab and store version + run: | + tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$") + echo "VERSION=$tag_name" >> $GITHUB_ENV + - name: Package artifacts properly + run: | + mv ${{ github.workspace }}/PrismLauncher-source PrismLauncher-${{ env.VERSION }} + mv PrismLauncher-Linux-Qt6-Portable*/PrismLauncher-portable.tar.gz PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz + mv PrismLauncher-*.AppImage/PrismLauncher-*-x86_64.AppImage PrismLauncher-Linux-x86_64.AppImage + mv PrismLauncher-*.AppImage.zsync/PrismLauncher-*-x86_64.AppImage.zsync PrismLauncher-Linux-x86_64.AppImage.zsync + mv PrismLauncher-*.AppImage/PrismLauncher-*-aarch64.AppImage PrismLauncher-Linux-aarch64.AppImage + mv PrismLauncher-*.AppImage.zsync/PrismLauncher-*-aarch64.AppImage.zsync PrismLauncher-Linux-aarch64.AppImage.zsync + mv PrismLauncher-macOS*/PrismLauncher.zip PrismLauncher-macOS-${{ env.VERSION }}.zip + + tar --exclude='.git' -czf PrismLauncher-${{ env.VERSION }}.tar.gz PrismLauncher-${{ env.VERSION }} + + for d in PrismLauncher-Windows-MSVC*; do + cd "${d}" || continue + LEGACY="$(echo -n ${d} | grep -o Legacy || true)" + ARM64="$(echo -n ${d} | grep -o arm64 || true)" + INST="$(echo -n ${d} | grep -o Setup || true)" + PORT="$(echo -n ${d} | grep -o Portable || true)" + NAME="PrismLauncher-Windows-MSVC" + test -z "${LEGACY}" || NAME="${NAME}-Legacy" + test -z "${ARM64}" || NAME="${NAME}-arm64" + test -z "${PORT}" || NAME="${NAME}-Portable" + test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe + test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * + cd .. + done + + for d in PrismLauncher-Windows-MinGW-w64*; do + cd "${d}" || continue + INST="$(echo -n ${d} | grep -o Setup || true)" + PORT="$(echo -n ${d} | grep -o Portable || true)" + NAME="PrismLauncher-Windows-MinGW-w64" + test -z "${PORT}" || NAME="${NAME}-Portable" + test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe + test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * + cd .. + done + + for d in PrismLauncher-Windows-MinGW-arm64*; do + cd "${d}" || continue + INST="$(echo -n ${d} | grep -o Setup || true)" + PORT="$(echo -n ${d} | grep -o Portable || true)" + NAME="PrismLauncher-Windows-MinGW-arm64" + test -z "${PORT}" || NAME="${NAME}-Portable" + test -z "${INST}" || mv PrismLauncher-*.exe ../${NAME}-Setup-${{ env.VERSION }}.exe + test -n "${INST}" || zip -r -9 "../${NAME}-${{ env.VERSION }}.zip" * + cd .. + done + + - name: Create release + id: create_release + uses: softprops/action-gh-release@v2 + with: + token: ${{ secrets.GITHUB_TOKEN }} + tag_name: ${{ github.ref }} + name: Prism Launcher ${{ env.VERSION }} + draft: true + prerelease: false + files: | + PrismLauncher-Linux-x86_64.AppImage + PrismLauncher-Linux-x86_64.AppImage.zsync + PrismLauncher-Linux-aarch64.AppImage + PrismLauncher-Linux-aarch64.AppImage.zsync + PrismLauncher-Linux-Qt6-Portable-${{ env.VERSION }}.tar.gz + PrismLauncher-Linux-aarch64-Qt6-Portable-${{ env.VERSION }}.tar.gz + PrismLauncher-Windows-MinGW-w64-${{ env.VERSION }}.zip + PrismLauncher-Windows-MinGW-w64-Portable-${{ env.VERSION }}.zip + PrismLauncher-Windows-MinGW-w64-Setup-${{ env.VERSION }}.exe + PrismLauncher-Windows-MinGW-arm64-${{ env.VERSION }}.zip + PrismLauncher-Windows-MinGW-arm64-Portable-${{ env.VERSION }}.zip + PrismLauncher-Windows-MinGW-arm64-Setup-${{ env.VERSION }}.exe + PrismLauncher-Windows-MSVC-arm64-${{ env.VERSION }}.zip + PrismLauncher-Windows-MSVC-arm64-Portable-${{ env.VERSION }}.zip + PrismLauncher-Windows-MSVC-arm64-Setup-${{ env.VERSION }}.exe + PrismLauncher-Windows-MSVC-${{ env.VERSION }}.zip + PrismLauncher-Windows-MSVC-Portable-${{ env.VERSION }}.zip + PrismLauncher-Windows-MSVC-Setup-${{ env.VERSION }}.exe + PrismLauncher-macOS-${{ env.VERSION }}.zip + PrismLauncher-${{ env.VERSION }}.tar.gz