From 052510ae1aea24456a62abc767358cce9206a307 Mon Sep 17 00:00:00 2001 From: GreemDev Date: Mon, 2 Jun 2025 21:50:10 -0500 Subject: [PATCH] Add GitLab package publishing to canary script --- .github/workflows/canary.yml | 60 ++++++++++++++++++++++++++++++++++-- 1 file changed, 58 insertions(+), 2 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index de3dd6892..e69989fc6 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -79,7 +79,7 @@ jobs: matrix: platform: - { name: win-x64, os: windows-latest, zip_os_name: win_x64 } - - { name: win-arm64, os: windows-latest, zip_os_name: win_arm64 } + #- { name: win-arm64, os: windows-latest, zip_os_name: win_arm64 } - { name: linux-x64, os: ubuntu-latest, zip_os_name: linux_x64 } - { name: linux-arm64, os: ubuntu-latest, zip_os_name: linux_arm64 } steps: @@ -91,6 +91,16 @@ jobs: - name: Overwrite csc problem matcher run: echo "::add-matcher::.github/csc.json" + + - name: Install GitLabCli + run: | + mkdir -p $HOME/.bin + gh release download -R GreemDev/GLI -O gli -p 'GitLabCli-linux_x64' + chmod +x gli + mv gli $HOME/.bin/ + echo "$HOME/.bin" >> $GITHUB_PATH + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Get version info id: version_info @@ -106,7 +116,7 @@ jobs: sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' src/Ryujinx.Common/ReleaseInformation.cs sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' src/Ryujinx.Common/ReleaseInformation.cs sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs - sed -r --in-place '/^Name=Ryujinx$/s/Name=Ryujinx/Name=Ryujinx-Canary/' distribution/linux/Ryujinx.desktop + sed -r --in-place '/^Name=Ryujinx$/s/Name=Ryujinx/Name=Ryujinx-Canary/' distribution/linux/Ryujinx.desktop shell: bash - name: Create output dir @@ -123,6 +133,7 @@ jobs: rm libarmeilleure-jitsupport.dylib 7z a ../release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../publish popd + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=UploadGenericPackage "ryubing_canary|${{ steps.version_info.outputs.build_version }}|release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip" shell: bash - name: Packing Linux builds @@ -133,6 +144,7 @@ jobs: chmod +x Ryujinx.sh Ryujinx tar -czvf ../release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz ../publish popd + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=UploadGenericPackage "ryubing_canary|${{ steps.version_info.outputs.build_version }}|release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz" shell: bash - name: Build AppImage (Linux) @@ -169,6 +181,9 @@ jobs: pushd publish_appimage mv Ryujinx.AppImage ../release_output/ryujinx-canary-$BUILD_VERSION-$ARCH_NAME.AppImage mv Ryujinx.AppImage.zsync ../release_output/ryujinx-canary-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync + + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=UploadGenericPackage "ryubing_canary|${{ steps.version_info.outputs.build_version }}|../release_output/ryujinx-canary-$BUILD_VERSION-$ARCH_NAME.AppImage" + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=UploadGenericPackage "ryubing_canary|${{ steps.version_info.outputs.build_version }}|../release_output/ryujinx-canary-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync" popd shell: bash @@ -214,6 +229,16 @@ jobs: wget https://apt.llvm.org/llvm.sh chmod +x llvm.sh sudo ./llvm.sh 17 + + - name: Install GitLabCli + run: | + mkdir -p $HOME/.bin + gh release download -R GreemDev/GLI -O gli -p 'GitLabCli-linux_x64' + chmod +x gli + mv gli $HOME/.bin/ + echo "$HOME/.bin" >> $GITHUB_PATH + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Install rcodesign run: | @@ -246,6 +271,7 @@ jobs: - name: Publish macOS Ryujinx run: | ./distribution/macos/create_macos_build_ava.sh . publish_tmp_ava publish_ava ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release 1 + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=UploadGenericPackage "ryubing_canary|${{ steps.version_info.outputs.build_version }}|release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz" - name: Pushing new release uses: ncipollo/release-action@v1 @@ -260,3 +286,33 @@ jobs: owner: ${{ secrets.RC_OWNER }} repo: ${{ secrets.RC_CANARY_NAME }} token: ${{ secrets.ALT_RELEASE_TOKEN }} + + create_gitlab_release: + name: Create GitLab Release + runs-on: ubuntu-24.04 + needs: + - tag + - macos_release + - release + steps: + - name: Get version info + id: version_info + run: | + echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT + echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT + echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT + shell: bash + + - name: Install GitLabCli + run: | + mkdir -p $HOME/.bin + gh release download -R GreemDev/GLI -O gli -p 'GitLabCli-linux_x64' + chmod +x gli + mv gli $HOME/.bin/ + echo "$HOME/.bin" >> $GITHUB_PATH + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Create release + run: | + gli --access-token=${{ secrets.GITLAB_TOKEN }} --project=ryubing/canary --command=CreateReleaseFromGenericPackages "ryubing_canary|${{ steps.version_info.outputs.build_version }}|main|Canary ${{ steps.version_info.outputs.build_version }}|**[Full Changelog](https://git.ryujinx.app/ryubing/ryujinx/-/compare/Canary-${{ steps.version_info.outputs.prev_build_version }}...Canary-${{ steps.version_info.outputs.build_version }})**"