2023-04-03 21:02:30 +00:00
|
|
|
name: Create Ryujinx release builds
|
|
|
|
description: Prepares everything for a new release
|
|
|
|
|
|
|
|
inputs:
|
2023-04-04 14:42:03 +00:00
|
|
|
version:
|
|
|
|
description: Version
|
|
|
|
default: "1.0.0"
|
2023-04-03 21:02:30 +00:00
|
|
|
required: true
|
|
|
|
rid:
|
|
|
|
description: .NET runtime identifier or 'osx-universal'
|
|
|
|
required: true
|
|
|
|
channel:
|
|
|
|
description: Release channel name
|
|
|
|
default: "master"
|
|
|
|
required: true
|
|
|
|
owner:
|
|
|
|
description: Release channel owner
|
|
|
|
default: "Ryujinx"
|
|
|
|
required: true
|
|
|
|
repo:
|
|
|
|
description: Release channel repo
|
|
|
|
default: "release-channel-master"
|
|
|
|
required: true
|
|
|
|
|
|
|
|
runs:
|
|
|
|
using: composite
|
|
|
|
steps:
|
|
|
|
- uses: actions/setup-dotnet@v3
|
|
|
|
with:
|
|
|
|
global-json-file: global.json
|
|
|
|
|
|
|
|
- name: Overwrite csc problem matcher
|
|
|
|
run: echo "::add-matcher::.github/csc.json"
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Extract RID components
|
|
|
|
id: rid
|
|
|
|
run: |
|
|
|
|
echo "os=$(echo ${{ inputs.rid }} | awk -F'-' '{ print $1 }')" >> $GITHUB_OUTPUT
|
|
|
|
echo "arch=$(echo ${{ inputs.rid }} | awk -F'-' '{ print $NF }')" >> $GITHUB_OUTPUT
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
|
|
|
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Configure for release
|
|
|
|
run: |
|
2023-04-04 14:42:03 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ inputs.version }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2023-04-03 21:02:30 +00:00
|
|
|
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\%\%/${{ inputs.channel }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ inputs.owner }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ inputs.repo }}/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Create output dir
|
2023-04-04 14:42:03 +00:00
|
|
|
run: mkdir release_output
|
2023-04-03 21:02:30 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Publish
|
|
|
|
if: ${{ steps.rid.outputs.os != 'osx' }}
|
|
|
|
run: |
|
2023-04-04 14:42:03 +00:00
|
|
|
dotnet publish -c Release -r "${{ inputs.rid }}" -o ./publish_gtk/publish -p:Version="${{ inputs.version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx --self-contained true
|
|
|
|
dotnet publish -c Release -r "${{ inputs.rid }}" -o ./publish_sdl2_headless/publish -p:Version="${{ inputs.version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Headless.SDL2 --self-contained true
|
|
|
|
dotnet publish -c Release -r "${{ inputs.rid }}" -o ./publish_ava/publish -p:Version="${{ inputs.version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded src/Ryujinx.Ava --self-contained true
|
2023-04-03 21:02:30 +00:00
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Packing Windows builds
|
|
|
|
if: ${{ startsWith(steps.rid.outputs.os, 'win') }}
|
|
|
|
run: |
|
|
|
|
pushd publish_gtk
|
2023-04-04 14:42:03 +00:00
|
|
|
7z a ../release_output/ryujinx-${{ inputs.version }}-win_${{ steps.rid.outputs.arch }}.zip publish
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_sdl2_headless
|
2023-04-04 14:42:03 +00:00
|
|
|
7z a ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-win_${{ steps.rid.outputs.arch }}.zip publish
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_ava
|
2023-04-04 14:42:03 +00:00
|
|
|
7z a ../release_output/test-ava-ryujinx-${{ inputs.version }}-win_${{ steps.rid.outputs.arch }}.zip publish
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Packing Linux builds
|
|
|
|
if: ${{ steps.rid.outputs.os == 'linux' }}
|
|
|
|
run: |
|
|
|
|
pushd publish_gtk
|
2023-04-04 14:42:03 +00:00
|
|
|
tar --exclude "publish/Ryujinx" --exclude "publish/Ryujinx.sh" -cvf ../release_output/ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar publish
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx" "publish/Ryujinx"
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
|
|
|
gzip -9 < ../release_output/ryujinx-${{ inputs.version }}-linux_x64.tar > ../release_output/ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar.gz
|
|
|
|
rm ../release_output/ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_sdl2_headless
|
2023-04-04 14:42:03 +00:00
|
|
|
tar --exclude "publish/Ryujinx.Headless.SDL2" --exclude "publish/Ryujinx.sh" -cvf ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar publish
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx.Headless.SDL2" "publish/Ryujinx.Headless.SDL2"
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
|
|
|
gzip -9 < ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_x64.tar > ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar.gz
|
|
|
|
rm ../release_output/sdl2-ryujinx-headless-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_ava
|
2023-04-04 14:42:03 +00:00
|
|
|
tar --exclude "publish/Ryujinx.Ava" --exclude "publish/Ryujinx.sh" -cvf ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar publish
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx.Ava" "publish/Ryujinx.Ava"
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
|
|
|
gzip -9 < ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_x64.tar > ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar.gz
|
|
|
|
rm ../release_output/test-ava-ryujinx-${{ inputs.version }}-linux_${{ steps.rid.outputs.arch }}.tar
|
2023-04-03 21:02:30 +00:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Publish macOS
|
|
|
|
if: ${{ steps.rid.outputs.os == 'osx' }}
|
|
|
|
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
|
|
|
|
./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
|
|
|
|
mv ./publish_ava/*.tar.gz ./release_output/
|
|
|
|
mv ./publish_headless/*.tar.gz ./release_output/
|
|
|
|
shell: bash
|