2022-01-22 16:56:09 +00:00
|
|
|
name: Release job
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
|
|
|
push:
|
2024-11-06 22:48:20 +00:00
|
|
|
branches: [ release ]
|
2022-01-22 16:56:09 +00:00
|
|
|
paths-ignore:
|
2023-06-12 18:42:27 +00:00
|
|
|
- '.github/**'
|
2024-10-13 21:32:24 +00:00
|
|
|
- 'docs/**'
|
2024-10-19 05:29:04 +00:00
|
|
|
- 'assets/**'
|
2022-01-22 16:56:09 +00:00
|
|
|
- '*.yml'
|
2023-06-12 18:42:27 +00:00
|
|
|
- '*.json'
|
|
|
|
- '*.config'
|
2024-01-27 19:50:28 +00:00
|
|
|
- '*.md'
|
2022-01-22 16:56:09 +00:00
|
|
|
|
2022-12-09 16:15:28 +00:00
|
|
|
concurrency: release
|
2022-01-22 16:56:09 +00:00
|
|
|
|
2023-03-11 18:09:48 +00:00
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
2024-10-11 02:49:38 +00:00
|
|
|
RYUJINX_BASE_VERSION: "1.2"
|
2024-11-06 22:48:20 +00:00
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_NAME: "release"
|
2024-10-10 23:40:37 +00:00
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "GreemDev"
|
2024-10-11 02:49:38 +00:00
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "Ryujinx"
|
2024-10-26 12:36:49 +00:00
|
|
|
RELEASE: 1
|
2023-03-11 18:09:48 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
jobs:
|
2023-05-11 15:36:53 +00:00
|
|
|
tag:
|
|
|
|
name: Create tag
|
2023-11-11 21:38:54 +00:00
|
|
|
runs-on: ubuntu-20.04
|
2023-05-11 15:36:53 +00:00
|
|
|
steps:
|
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
|
|
|
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
2024-10-21 07:42:32 +00:00
|
|
|
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
|
2023-05-11 15:36:53 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Create tag
|
2024-10-20 00:42:03 +00:00
|
|
|
uses: actions/github-script@v7
|
2023-05-11 15:36:53 +00:00
|
|
|
with:
|
|
|
|
script: |
|
|
|
|
github.rest.git.createRef({
|
|
|
|
owner: context.repo.owner,
|
|
|
|
repo: context.repo.repo,
|
|
|
|
ref: 'refs/tags/${{ steps.version_info.outputs.build_version }}',
|
|
|
|
sha: context.sha
|
|
|
|
})
|
|
|
|
|
2024-03-02 11:58:03 +00:00
|
|
|
- name: Create release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
2024-10-21 07:42:32 +00:00
|
|
|
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
|
2024-03-02 11:58:03 +00:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
|
|
|
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
release:
|
2024-02-10 21:05:46 +00:00
|
|
|
name: Release for ${{ matrix.platform.name }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
2023-05-11 15:36:53 +00:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-10 21:05:46 +00:00
|
|
|
platform:
|
|
|
|
- { name: win-x64, os: windows-latest, zip_os_name: win_x64 }
|
|
|
|
- { name: linux-x64, os: ubuntu-latest, zip_os_name: linux_x64 }
|
|
|
|
- { name: linux-arm64, os: ubuntu-latest, zip_os_name: linux_arm64 }
|
2022-01-22 16:56:09 +00:00
|
|
|
steps:
|
2023-09-04 20:16:17 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2023-12-04 18:15:30 +00:00
|
|
|
- uses: actions/setup-dotnet@v4
|
2022-01-22 16:56:09 +00:00
|
|
|
with:
|
2023-03-11 18:04:13 +00:00
|
|
|
global-json-file: global.json
|
2024-03-13 22:26:35 +00:00
|
|
|
|
2023-08-16 20:58:34 +00:00
|
|
|
- name: Overwrite csc problem matcher
|
|
|
|
run: echo "::add-matcher::.github/csc.json"
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
2022-10-21 08:31:38 +00:00
|
|
|
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
2024-10-21 07:42:32 +00:00
|
|
|
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
|
2022-10-21 08:31:38 +00:00
|
|
|
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
2022-01-22 16:56:09 +00:00
|
|
|
shell: bash
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Configure for release
|
|
|
|
run: |
|
2023-04-26 03:12:19 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
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_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2024-11-11 05:32:37 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2024-01-29 18:58:18 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2022-01-22 16:56:09 +00:00
|
|
|
shell: bash
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Create output dir
|
|
|
|
run: "mkdir release_output"
|
2023-05-11 15:36:53 +00:00
|
|
|
|
|
|
|
- name: Publish
|
2022-01-22 16:56:09 +00:00
|
|
|
run: |
|
2024-11-10 01:30:19 +00:00
|
|
|
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
|
|
|
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_sdl2_headless -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained -p:IncludeNativeLibrariesForSelfExtract=true
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Packing Windows builds
|
2024-02-10 21:05:46 +00:00
|
|
|
if: matrix.platform.os == 'windows-latest'
|
2022-01-22 16:56:09 +00:00
|
|
|
run: |
|
2024-11-10 01:30:19 +00:00
|
|
|
pushd publish
|
|
|
|
rm libarmeilleure-jitsupport.dylib
|
|
|
|
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../publish
|
2022-01-22 16:56:09 +00:00
|
|
|
popd
|
|
|
|
|
2023-05-11 15:36:53 +00:00
|
|
|
pushd publish_sdl2_headless
|
2024-11-10 01:30:19 +00:00
|
|
|
rm libarmeilleure-jitsupport.dylib
|
2024-11-20 18:20:38 +00:00
|
|
|
7z a ../release_output/nogui-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../publish
|
2022-05-15 14:28:32 +00:00
|
|
|
popd
|
2022-01-22 16:56:09 +00:00
|
|
|
shell: bash
|
2024-11-10 01:30:19 +00:00
|
|
|
|
|
|
|
- name: Build AppImage (Linux)
|
|
|
|
if: matrix.platform.os == 'ubuntu-latest'
|
|
|
|
run: |
|
|
|
|
BUILD_VERSION="${{ steps.version_info.outputs.build_version }}"
|
|
|
|
PLATFORM_NAME="${{ matrix.platform.name }}"
|
|
|
|
|
|
|
|
sudo apt install -y zsync desktop-file-utils appstream
|
|
|
|
|
|
|
|
mkdir -p tools
|
|
|
|
export PATH="$PATH:$(readlink -f tools)"
|
|
|
|
|
|
|
|
# Setup appimagetool
|
|
|
|
wget -q -O tools/appimagetool "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage"
|
|
|
|
chmod +x tools/appimagetool
|
|
|
|
chmod +x distribution/linux/appimage/build-appimage.sh
|
|
|
|
|
|
|
|
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
|
|
|
|
if [ "$PLATFORM_NAME" = "linux-x64" ]; then
|
|
|
|
ARCH_NAME=x64
|
|
|
|
export ARCH=x86_64
|
|
|
|
elif [ "$PLATFORM_NAME" = "linux-arm64" ]; then
|
|
|
|
ARCH_NAME=arm64
|
|
|
|
export ARCH=aarch64
|
|
|
|
else
|
|
|
|
echo "Unexpected PLATFORM_NAME "$PLATFORM_NAME""
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|${{ github.event.repository.name }}|latest|*-$ARCH_NAME.AppImage.zsync"
|
|
|
|
BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
|
|
|
|
|
|
|
|
pushd publish_appimage
|
|
|
|
mv Ryujinx.AppImage ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage
|
|
|
|
mv Ryujinx.AppImage.zsync ../release_output/ryujinx-$BUILD_VERSION-$ARCH_NAME.AppImage.zsync
|
|
|
|
popd
|
|
|
|
shell: bash
|
2022-01-22 16:56:09 +00:00
|
|
|
|
|
|
|
- name: Packing Linux builds
|
2024-02-10 21:05:46 +00:00
|
|
|
if: matrix.platform.os == 'ubuntu-latest'
|
2022-01-22 16:56:09 +00:00
|
|
|
run: |
|
2024-11-10 01:30:19 +00:00
|
|
|
pushd publish
|
|
|
|
chmod +x Ryujinx.sh Ryujinx
|
|
|
|
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz ../publish
|
2022-01-22 16:56:09 +00:00
|
|
|
popd
|
|
|
|
|
2023-05-11 15:36:53 +00:00
|
|
|
pushd publish_sdl2_headless
|
2024-11-10 01:30:19 +00:00
|
|
|
chmod +x Ryujinx.sh Ryujinx.Headless.SDL2
|
2024-11-20 18:20:38 +00:00
|
|
|
tar -czvf ../release_output/nogui-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz ../publish
|
2022-05-15 14:28:32 +00:00
|
|
|
popd
|
2022-01-22 16:56:09 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Pushing new release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
2024-11-19 15:30:41 +00:00
|
|
|
artifacts: "release_output/*.tar.gz,release_output/*.zip,release_output/*AppImage*"
|
2022-01-22 16:56:09 +00:00
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
2024-10-21 07:42:32 +00:00
|
|
|
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
|
2023-05-11 15:36:53 +00:00
|
|
|
omitBodyDuringUpdate: true
|
2022-01-22 16:56:09 +00:00
|
|
|
allowUpdates: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
|
|
|
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
2023-03-11 18:04:13 +00:00
|
|
|
|
2023-05-11 15:36:53 +00:00
|
|
|
macos_release:
|
|
|
|
name: Release MacOS universal
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-09-04 20:16:17 +00:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-11 15:36:53 +00:00
|
|
|
|
2023-12-04 18:15:30 +00:00
|
|
|
- uses: actions/setup-dotnet@v4
|
2023-03-22 12:17:28 +00:00
|
|
|
with:
|
2023-05-11 15:36:53 +00:00
|
|
|
global-json-file: global.json
|
2023-05-13 11:24:43 +00:00
|
|
|
|
2023-11-11 21:35:58 +00:00
|
|
|
- name: Setup LLVM 15
|
2023-05-11 15:36:53 +00:00
|
|
|
run: |
|
|
|
|
wget https://apt.llvm.org/llvm.sh
|
|
|
|
chmod +x llvm.sh
|
2023-11-11 21:35:58 +00:00
|
|
|
sudo ./llvm.sh 15
|
2023-05-11 15:36:53 +00:00
|
|
|
|
|
|
|
- name: Install rcodesign
|
|
|
|
run: |
|
|
|
|
mkdir -p $HOME/.bin
|
|
|
|
gh release download -R indygreg/apple-platform-rs -O apple-codesign.tar.gz -p 'apple-codesign-*-x86_64-unknown-linux-musl.tar.gz'
|
|
|
|
tar -xzvf apple-codesign.tar.gz --wildcards '*/rcodesign' --strip-components=1
|
|
|
|
rm apple-codesign.tar.gz
|
|
|
|
mv rcodesign $HOME/.bin/
|
|
|
|
echo "$HOME/.bin" >> $GITHUB_PATH
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
|
|
|
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
2024-10-21 07:42:32 +00:00
|
|
|
echo "prev_build_version=${{ env.RYUJINX_BASE_VERSION }}.$((${{ github.run_number }} - 1))" >> $GITHUB_OUTPUT
|
2023-05-11 15:36:53 +00:00
|
|
|
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
|
|
|
|
|
|
|
- name: Configure for release
|
|
|
|
run: |
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
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_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2024-11-11 05:32:37 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2024-01-29 18:58:18 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2023-05-11 15:36:53 +00:00
|
|
|
shell: bash
|
|
|
|
|
2024-03-02 11:51:05 +00:00
|
|
|
- name: Publish macOS Ryujinx
|
2023-05-11 15:36:53 +00:00
|
|
|
run: |
|
2024-11-21 18:34:53 +00:00
|
|
|
./distribution/macos/create_macos_build_ava.sh . publish_tmp_ava publish ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release 0
|
2024-03-02 11:51:05 +00:00
|
|
|
|
2023-09-04 23:28:44 +00:00
|
|
|
- name: Publish macOS Ryujinx.Headless.SDL2
|
|
|
|
run: |
|
2024-11-21 18:34:53 +00:00
|
|
|
./distribution/macos/create_macos_build_headless.sh . publish_tmp_headless publish_headless ./distribution/macos/entitlements.xml "${{ steps.version_info.outputs.build_version }}" "${{ steps.version_info.outputs.git_short_hash }}" Release 0
|
2023-05-11 15:36:53 +00:00
|
|
|
|
|
|
|
- name: Pushing new release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
2024-11-10 01:30:19 +00:00
|
|
|
artifacts: "publish/*.tar.gz, publish_headless/*.tar.gz"
|
2023-05-11 15:36:53 +00:00
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
2024-10-21 07:42:32 +00:00
|
|
|
body: "**Full Changelog**: https://github.com/${{ github.repository }}/compare/${{ steps.version_info.outputs.prev_build_version }}...${{ steps.version_info.outputs.build_version }}"
|
2023-05-11 15:36:53 +00:00
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
allowUpdates: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
|
|
|
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|