2024-11-06 19:48:20 -03:00
name : Canary release job
on :
workflow_dispatch :
inputs : {}
push :
branches : [ master ]
paths-ignore :
- '.github/**'
- 'docs/**'
- 'assets/**'
- '*.yml'
- '*.json'
- '*.config'
- '*.md'
concurrency : release
env :
POWERSHELL_TELEMETRY_OPTOUT : 1
DOTNET_CLI_TELEMETRY_OPTOUT : 1
RYUJINX_BASE_VERSION : "1.2"
RYUJINX_TARGET_RELEASE_CHANNEL_NAME : "canary"
2024-12-27 05:05:37 -03:00
RYUJINX_TARGET_RELEASE_CHANNEL_OWNER : "Ryubing"
2024-11-11 02:26:15 -03:00
RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO : "Ryujinx"
2024-12-27 04:41:48 -03:00
RYUJINX_TARGET_RELEASE_CHANNEL_REPO : "Canary-Releases"
2024-11-06 19:48:20 -03:00
RELEASE : 1
jobs :
tag :
name : Create tag
runs-on : ubuntu-20.04
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
shell : bash
- name : Create tag
uses : actions/github-script@v7
with :
script : |
github.rest.git.createRef({
2024-12-27 19:11:23 -03:00
owner : "${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}" ,
repo : "${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO }}" ,
2024-11-06 19:55:17 -03:00
ref : 'refs/tags/Canary-${{ steps.version_info.outputs.build_version }}' ,
2024-11-06 19:48:20 -03:00
sha : context.sha
})
- name : Create release
uses : ncipollo/release-action@v1
with :
name : "Canary ${{ steps.version_info.outputs.build_version }}"
tag : ${{ steps.version_info.outputs.build_version }}
2024-12-10 14:02:18 -03:00
body : |
# Canary builds:
These builds are experimental and may sometimes not work, use [regular builds](https://github.com/${{ github.repository }}/releases/latest) instead if that sounds like something you don't want to deal with.
| Platform | Artifact |
|--|--|
2024-12-20 18:51:24 -03:00
| Windows 64-bit | [Canary Windows Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-win_x64.zip) |
| Linux 64-bit | [Canary Linux Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz) |
| Linux ARM 64-bit | [Canary Linux ARM Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_arm64.tar.gz) |
2024-12-27 18:44:20 -03:00
| macOS | [Canary macOS Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-macos_universal.app.tar.gz) |
2024-12-10 14:02:18 -03:00
2024-12-13 22:28:34 -03:00
**Full Changelog** : https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO }}/compare/Canary-${{ steps.version_info.outputs.prev_build_version }}...Canary-${{ steps.version_info.outputs.build_version }}
2024-11-06 19:48:20 -03:00
omitBodyDuringUpdate : true
owner : ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
repo : ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
token : ${{ secrets.RELEASE_TOKEN }}
release :
name : Release for ${{ matrix.platform.name }}
runs-on : ${{ matrix.platform.os }}
strategy :
matrix :
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 }
steps :
- uses : actions/checkout@v4
- uses : actions/setup-dotnet@v4
with :
global-json-file : global.json
- name : Overwrite csc problem matcher
run : echo "::add-matcher::.github/csc.json"
- 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 : 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
2024-11-11 02:34:30 -03:00
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 02:32:37 -03:00
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
2024-11-06 19:48:20 -03:00
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
2025-01-06 04:07:16 -03:00
sed -r --in-place '/^Name=Ryujinx$/s/Name=Ryujinx/Name=Ryujinx-Canary/' distribution/linux/Ryujinx.desktop
2024-11-06 19:48:20 -03:00
shell : bash
- name : Create output dir
run : "mkdir release_output"
- name : Publish
run : |
2025-01-06 04:07:16 -03: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
2024-11-06 19:48:20 -03:00
- name : Packing Windows builds
if : matrix.platform.os == 'windows-latest'
run : |
2025-01-06 04:07:16 -03:00
pushd publish
2025-01-06 04:15:39 -03:00
rm libarmeilleure-jitsupport.dylib
2025-01-06 04:07:16 -03:00
7z a ../release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip ../publish
2024-11-06 19:48:20 -03:00
popd
shell : bash
- name : Packing Linux builds
if : matrix.platform.os == 'ubuntu-latest'
run : |
2025-01-06 04:07:16 -03:00
pushd publish
2025-01-06 04:15:39 -03:00
rm libarmeilleure-jitsupport.dylib
chmod +x Ryujinx.sh Ryujinx
2025-01-06 04:07:16 -03:00
tar -czvf ../release_output/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz ../publish
2024-11-06 19:48:20 -03:00
popd
shell : bash
2025-01-06 04:07:16 -03: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 }}"
2024-11-06 19:48:20 -03:00
2025-01-06 04:07:16 -03:00
sudo apt install -y zsync desktop-file-utils appstream
2024-11-06 19:48:20 -03:00
2025-01-06 04:07:16 -03:00
mkdir -p tools
export PATH="$PATH:$(readlink -f tools)"
2024-11-06 19:48:20 -03:00
# Setup appimagetool
2025-01-06 04:07:16 -03:00
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
2024-11-06 19:48:20 -03:00
# Explicitly set $ARCH for appimagetool ($ARCH_NAME is for the file name)
2025-01-06 04:07:16 -03:00
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
2025-01-06 04:27:37 -03:00
export UFLAG="gh-releases-zsync|${{ github.repository_owner }}|Canary-Releases|latest|*-$ARCH_NAME.AppImage.zsync"
2025-01-06 04:07:16 -03:00
BUILDDIR=publish OUTDIR=publish_appimage distribution/linux/appimage/build-appimage.sh
pushd publish_appimage
2025-01-06 04:22:05 -03:00
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
2025-01-06 04:07:16 -03:00
popd
shell : bash
2024-11-06 19:48:20 -03:00
- name : Pushing new release
uses : ncipollo/release-action@v1
with :
name : ${{ steps.version_info.outputs.build_version }}
2025-01-06 04:07:16 -03:00
artifacts : "release_output/*.tar.gz,release_output/*.zip,release_output/*AppImage*"
2024-11-06 19:48:20 -03:00
tag : ${{ steps.version_info.outputs.build_version }}
2024-12-10 14:02:18 -03:00
body : |
# Canary builds:
2024-12-27 18:44:20 -03:00
These builds are experimental and may sometimes not work, use [regular builds](https://github.com/${{ github.repository }}/releases/latest) instead if that sounds like something you don't want to deal with.
2024-12-10 14:02:18 -03:00
| Platform | Artifact |
|--|--|
2024-12-27 18:44:20 -03:00
| Windows 64-bit | [Canary Windows Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-win_x64.zip) |
| Linux 64-bit | [Canary Linux Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz) |
| Linux ARM 64-bit | [Canary Linux ARM Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-linux_arm64.tar.gz) |
| macOS | [Canary macOS Artifact](https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/releases/download/${{ steps.version_info.outputs.build_version }}/ryujinx-canary-${{ steps.version_info.outputs.build_version }}-macos_universal.app.tar.gz) |
2024-12-10 14:02:18 -03:00
2024-12-27 18:44:20 -03:00
**Full Changelog** : https://github.com/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO }}/compare/Canary-${{ steps.version_info.outputs.prev_build_version }}...Canary-${{ steps.version_info.outputs.build_version }}
2024-11-06 19:48:20 -03: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 }}
macos_release :
name : Release MacOS universal
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v4
- uses : actions/setup-dotnet@v4
with :
global-json-file : global.json
- name : Setup LLVM 15
run : |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 15
- 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
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
- 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
2024-11-11 02:32:37 -03:00
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_SOURCE_REPO }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
2024-11-06 19:48:20 -03:00
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
shell : bash
- name : Publish macOS Ryujinx
run : |
2024-11-21 15:34:53 -03:00
./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
2024-11-06 19:48:20 -03:00
- name : Pushing new release
uses : ncipollo/release-action@v1
with :
name : "Canary ${{ steps.version_info.outputs.build_version }}"
2024-12-28 06:49:06 -03:00
artifacts : "publish_ava/*.tar.gz"
2024-11-06 19:48:20 -03:00
tag : ${{ steps.version_info.outputs.build_version }}
2024-12-20 19:03:03 -03:00
body : ""
2024-11-06 19:48:20 -03: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 }}