2022-01-22 17:56:09 +01:00
|
|
|
name: Release job
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
2023-06-12 20:42:27 +02:00
|
|
|
- '.github/**'
|
2022-01-22 17:56:09 +01:00
|
|
|
- '*.yml'
|
2023-06-12 20:42:27 +02:00
|
|
|
- '*.json'
|
|
|
|
- '*.config'
|
2024-01-27 20:50:28 +01:00
|
|
|
- '*.md'
|
2022-01-22 17:56:09 +01:00
|
|
|
|
2022-12-09 17:15:28 +01:00
|
|
|
concurrency: release
|
2022-01-22 17:56:09 +01:00
|
|
|
|
2023-03-11 19:09:48 +01:00
|
|
|
env:
|
|
|
|
POWERSHELL_TELEMETRY_OPTOUT: 1
|
|
|
|
DOTNET_CLI_TELEMETRY_OPTOUT: 1
|
|
|
|
RYUJINX_BASE_VERSION: "1.1"
|
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_NAME: "master"
|
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_OWNER: "Ryujinx"
|
|
|
|
RYUJINX_TARGET_RELEASE_CHANNEL_REPO: "release-channel-master"
|
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
jobs:
|
2023-05-11 17:36:53 +02:00
|
|
|
tag:
|
|
|
|
name: Create tag
|
2023-11-11 22:38:54 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2023-05-11 17:36:53 +02:00
|
|
|
steps:
|
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
|
|
|
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Create tag
|
2023-12-11 21:51:22 +01:00
|
|
|
uses: actions/github-script@v6
|
2023-05-11 17:36:53 +02: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 12:58:03 +01:00
|
|
|
- name: Create release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
|
|
|
body: "For more information about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
|
|
|
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
release:
|
2024-02-10 22:05:46 +01:00
|
|
|
name: Release for ${{ matrix.platform.name }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
2023-05-28 08:08:47 +02:00
|
|
|
timeout-minutes: ${{ fromJSON(vars.JOB_TIMEOUT) }}
|
2023-05-11 17:36:53 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2024-02-10 22:05:46 +01: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 17:56:09 +01:00
|
|
|
steps:
|
2023-09-04 22:16:17 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2023-12-04 19:15:30 +01:00
|
|
|
- uses: actions/setup-dotnet@v4
|
2022-01-22 17:56:09 +01:00
|
|
|
with:
|
2023-03-11 19:04:13 +01:00
|
|
|
global-json-file: global.json
|
2023-08-16 22:58:34 +02:00
|
|
|
|
|
|
|
- name: Overwrite csc problem matcher
|
|
|
|
run: echo "::add-matcher::.github/csc.json"
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
2022-10-21 10:31:38 +02:00
|
|
|
echo "build_version=${{ env.RYUJINX_BASE_VERSION }}.${{ github.run_number }}" >> $GITHUB_OUTPUT
|
|
|
|
echo "git_short_hash=$(git rev-parse --short "${{ github.sha }}")" >> $GITHUB_OUTPUT
|
2022-01-22 17:56:09 +01:00
|
|
|
shell: bash
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
- name: Configure for release
|
|
|
|
run: |
|
2023-04-26 05:12:19 +02: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-01-29 19:58:18 +01:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2022-01-22 17:56:09 +01:00
|
|
|
shell: bash
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
- name: Create output dir
|
|
|
|
run: "mkdir release_output"
|
2023-05-11 17:36:53 +02:00
|
|
|
|
|
|
|
- name: Publish
|
2022-01-22 17:56:09 +01:00
|
|
|
run: |
|
2024-03-02 12:51:05 +01:00
|
|
|
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_ava/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 true
|
2024-02-10 22:05:46 +01:00
|
|
|
dotnet publish -c Release -r "${{ matrix.platform.name }}" -o ./publish_sdl2_headless/publish -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 true
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2022-01-22 17:56:09 +01:00
|
|
|
- name: Packing Windows builds
|
2024-02-10 22:05:46 +01:00
|
|
|
if: matrix.platform.os == 'windows-latest'
|
2022-01-22 17:56:09 +01:00
|
|
|
run: |
|
2024-03-02 12:51:05 +01:00
|
|
|
pushd publish_ava
|
2024-02-10 22:05:46 +01:00
|
|
|
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
2022-01-22 17:56:09 +01:00
|
|
|
popd
|
|
|
|
|
2023-05-11 17:36:53 +02:00
|
|
|
pushd publish_sdl2_headless
|
2024-02-10 22:05:46 +01:00
|
|
|
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
2022-05-15 16:28:32 +02:00
|
|
|
popd
|
2022-05-15 17:50:16 +02:00
|
|
|
|
2023-05-11 17:36:53 +02:00
|
|
|
pushd publish_ava
|
2024-03-02 12:51:05 +01:00
|
|
|
mv publish/Ryujinx.exe publish/Ryujinx.Ava.exe
|
2024-02-10 22:05:46 +01:00
|
|
|
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.zip publish
|
2022-01-22 17:56:09 +01:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Packing Linux builds
|
2024-02-10 22:05:46 +01:00
|
|
|
if: matrix.platform.os == 'ubuntu-latest'
|
2022-01-22 17:56:09 +01:00
|
|
|
run: |
|
2024-03-02 12:51:05 +01:00
|
|
|
pushd publish_ava
|
2023-05-11 17:36:53 +02:00
|
|
|
chmod +x publish/Ryujinx.sh publish/Ryujinx
|
2024-02-10 22:05:46 +01:00
|
|
|
tar -czvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
2022-01-22 17:56:09 +01:00
|
|
|
popd
|
|
|
|
|
2023-05-11 17:36:53 +02:00
|
|
|
pushd publish_sdl2_headless
|
|
|
|
chmod +x publish/Ryujinx.sh publish/Ryujinx.Headless.SDL2
|
2024-02-10 22:05:46 +01:00
|
|
|
tar -czvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
2022-05-15 16:28:32 +02:00
|
|
|
popd
|
|
|
|
|
2023-05-11 17:36:53 +02:00
|
|
|
pushd publish_ava
|
2024-03-02 12:51:05 +01:00
|
|
|
mv publish/Ryujinx publish/Ryujinx.Ava
|
2023-05-11 17:36:53 +02:00
|
|
|
chmod +x publish/Ryujinx.sh publish/Ryujinx.Ava
|
2024-02-10 22:05:46 +01:00
|
|
|
tar -czvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-${{ matrix.platform.zip_os_name }}.tar.gz publish
|
2022-01-22 17:56:09 +01:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Pushing new release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
2022-05-15 18:05:55 +02:00
|
|
|
artifacts: "release_output/*.tar.gz,release_output/*.zip"
|
2022-01-22 17:56:09 +01:00
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
2023-04-26 05:12:19 +02:00
|
|
|
body: "For more information about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
2023-05-11 17:36:53 +02:00
|
|
|
omitBodyDuringUpdate: true
|
2022-01-22 17:56:09 +01: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 19:04:13 +01:00
|
|
|
|
2023-05-11 17:36:53 +02:00
|
|
|
macos_release:
|
|
|
|
name: Release MacOS universal
|
|
|
|
runs-on: ubuntu-latest
|
2023-05-28 08:08:47 +02:00
|
|
|
timeout-minutes: ${{ fromJSON(vars.JOB_TIMEOUT) }}
|
2023-05-11 17:36:53 +02:00
|
|
|
steps:
|
2023-09-04 22:16:17 +02:00
|
|
|
- uses: actions/checkout@v4
|
2023-05-11 17:36:53 +02:00
|
|
|
|
2023-12-04 19:15:30 +01:00
|
|
|
- uses: actions/setup-dotnet@v4
|
2023-03-22 13:17:28 +01:00
|
|
|
with:
|
2023-05-11 17:36:53 +02:00
|
|
|
global-json-file: global.json
|
2023-05-13 13:24:43 +02:00
|
|
|
|
2023-11-11 22:35:58 +01:00
|
|
|
- name: Setup LLVM 15
|
2023-05-11 17:36:53 +02:00
|
|
|
run: |
|
|
|
|
wget https://apt.llvm.org/llvm.sh
|
|
|
|
chmod +x llvm.sh
|
2023-11-11 22:35:58 +01:00
|
|
|
sudo ./llvm.sh 15
|
2023-05-11 17:36:53 +02: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
|
|
|
|
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-01-29 19:58:18 +01:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_CONFIG_FILE_NAME\%\%/Config\.json/g;' src/Ryujinx.Common/ReleaseInformation.cs
|
2023-05-11 17:36:53 +02:00
|
|
|
shell: bash
|
|
|
|
|
2024-03-02 12:51:05 +01:00
|
|
|
- name: Publish macOS Ryujinx
|
2023-05-11 17:36:53 +02:00
|
|
|
run: |
|
2023-09-05 01:28:44 +02: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
|
2024-03-02 12:51:05 +01:00
|
|
|
|
2023-09-05 01:28:44 +02:00
|
|
|
- name: Publish macOS Ryujinx.Headless.SDL2
|
|
|
|
run: |
|
|
|
|
./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
|
2023-05-11 17:36:53 +02:00
|
|
|
|
|
|
|
- name: Pushing new release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
2023-09-05 01:28:44 +02:00
|
|
|
artifacts: "publish_ava/*.tar.gz, publish_headless/*.tar.gz"
|
2023-05-11 17:36:53 +02:00
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
|
|
|
body: "For more information about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
|
|
|
omitBodyDuringUpdate: true
|
|
|
|
allowUpdates: true
|
|
|
|
replacesArtifacts: true
|
|
|
|
owner: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}
|
|
|
|
repo: ${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}
|
|
|
|
token: ${{ secrets.RELEASE_TOKEN }}
|
2023-03-22 13:17:28 +01:00
|
|
|
|
2023-03-11 19:04:13 +01:00
|
|
|
flatpak_release:
|
|
|
|
uses: ./.github/workflows/flatpak.yml
|
2023-03-11 19:13:40 +01:00
|
|
|
needs: release
|
2023-03-11 19:04:13 +01:00
|
|
|
with:
|
2023-03-11 20:11:09 +01:00
|
|
|
ryujinx_version: "1.1.${{ github.run_number }}"
|
2023-11-11 22:35:58 +01:00
|
|
|
secrets: inherit
|