2022-01-22 16:56:09 +00:00
|
|
|
name: Release job
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs: {}
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
paths-ignore:
|
|
|
|
- '.github/*'
|
|
|
|
- '.github/ISSUE_TEMPLATE/**'
|
|
|
|
- '*.yml'
|
|
|
|
- 'README.md'
|
|
|
|
|
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
|
|
|
|
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 16:56:09 +00:00
|
|
|
jobs:
|
|
|
|
release:
|
|
|
|
runs-on: windows-latest
|
|
|
|
steps:
|
2022-10-21 09:31:38 +01:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-dotnet@v3
|
2022-01-22 16:56:09 +00:00
|
|
|
with:
|
2023-03-11 18:04:13 +00:00
|
|
|
global-json-file: global.json
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Get version info
|
|
|
|
id: version_info
|
|
|
|
run: |
|
2022-10-21 09:31:38 +01: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 16:56:09 +00:00
|
|
|
shell: bash
|
|
|
|
- name: Configure for release
|
|
|
|
run: |
|
2023-01-07 08:06:13 +00:00
|
|
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_VERSION\%\%/${{ steps.version_info.outputs.build_version }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_BUILD_GIT_HASH\%\%/${{ steps.version_info.outputs.git_short_hash }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_NAME\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_NAME }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_OWNER\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_OWNER }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
|
|
|
sed -r --in-place 's/\%\%RYUJINX_TARGET_RELEASE_CHANNEL_REPO\%\%/${{ env.RYUJINX_TARGET_RELEASE_CHANNEL_REPO }}/g;' Ryujinx.Common/ReleaseInformation.cs
|
2022-01-22 16:56:09 +00:00
|
|
|
shell: bash
|
|
|
|
- name: Create output dir
|
|
|
|
run: "mkdir release_output"
|
|
|
|
- name: Publish Windows
|
|
|
|
run: |
|
2022-11-17 17:30:54 +00:00
|
|
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true
|
|
|
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true
|
|
|
|
dotnet publish -c Release -r win10-x64 -o ./publish_windows_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Packing Windows builds
|
|
|
|
run: |
|
|
|
|
pushd publish_windows
|
|
|
|
7z a ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
|
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_windows_sdl2_headless
|
2022-05-15 16:50:16 +01:00
|
|
|
7z a ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
|
2022-05-15 15:28:32 +01:00
|
|
|
popd
|
2022-05-15 16:50:16 +01:00
|
|
|
|
2022-05-15 15:28:32 +01:00
|
|
|
pushd publish_windows_ava
|
2022-05-15 17:05:55 +01:00
|
|
|
7z a ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-win_x64.zip publish
|
2022-01-22 16:56:09 +00:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Publish Linux
|
|
|
|
run: |
|
2022-11-17 17:30:54 +00:00
|
|
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx --self-contained true
|
|
|
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux_sdl2_headless/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Headless.SDL2 --self-contained true
|
|
|
|
dotnet publish -c Release -r linux-x64 -o ./publish_linux_ava/publish -p:Version="${{ steps.version_info.outputs.build_version }}" -p:SourceRevisionId="${{ steps.version_info.outputs.git_short_hash }}" -p:DebugType=embedded Ryujinx.Ava --self-contained true
|
2023-01-09 21:58:51 +00:00
|
|
|
|
2022-01-22 16:56:09 +00:00
|
|
|
- name: Packing Linux builds
|
|
|
|
run: |
|
|
|
|
pushd publish_linux
|
2023-01-09 23:45:46 +00:00
|
|
|
tar --exclude "publish/Ryujinx" --exclude "publish/Ryujinx.sh" -cvf ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar publish
|
2023-01-07 08:06:13 +00:00
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx" "publish/Ryujinx"
|
2023-01-09 23:45:46 +00:00
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
2023-01-07 08:06:13 +00:00
|
|
|
gzip -9 < ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar > ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz
|
|
|
|
rm ../release_output/ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar
|
2022-01-22 16:56:09 +00:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_linux_sdl2_headless
|
2023-01-09 23:45:46 +00:00
|
|
|
tar --exclude "publish/Ryujinx.Headless.SDL2" --exclude "publish/Ryujinx.sh" -cvf ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar publish
|
2023-01-07 08:06:13 +00:00
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx.Headless.SDL2" "publish/Ryujinx.Headless.SDL2"
|
2023-01-09 23:45:46 +00:00
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
2023-01-07 08:06:13 +00:00
|
|
|
gzip -9 < ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar > ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz
|
|
|
|
rm ../release_output/sdl2-ryujinx-headless-${{ steps.version_info.outputs.build_version }}-linux_x64.tar
|
2022-05-15 15:28:32 +01:00
|
|
|
popd
|
|
|
|
|
|
|
|
pushd publish_linux_ava
|
2023-01-09 23:45:46 +00:00
|
|
|
tar --exclude "publish/Ryujinx.Ava" --exclude "publish/Ryujinx.sh" -cvf ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar publish
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx.Ava" "publish/Ryujinx.Ava"
|
|
|
|
python3 ../distribution/misc/add_tar_exec.py ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar "publish/Ryujinx.sh" "publish/Ryujinx.sh"
|
2023-01-07 08:06:13 +00:00
|
|
|
gzip -9 < ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar > ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar.gz
|
|
|
|
rm ../release_output/test-ava-ryujinx-${{ steps.version_info.outputs.build_version }}-linux_x64.tar
|
2022-01-22 16:56:09 +00:00
|
|
|
popd
|
|
|
|
shell: bash
|
|
|
|
|
|
|
|
- name: Pushing new release
|
|
|
|
uses: ncipollo/release-action@v1
|
|
|
|
with:
|
|
|
|
name: ${{ steps.version_info.outputs.build_version }}
|
2022-05-15 17:05:55 +01:00
|
|
|
artifacts: "release_output/*.tar.gz,release_output/*.zip"
|
2022-01-22 16:56:09 +00:00
|
|
|
tag: ${{ steps.version_info.outputs.build_version }}
|
|
|
|
body: "For more informations about this release please check out the official [Changelog](https://github.com/Ryujinx/Ryujinx/wiki/Changelog)."
|
|
|
|
allowUpdates: true
|
|
|
|
removeArtifacts: 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-03-22 12:17:28 +00:00
|
|
|
- name: Create tag
|
|
|
|
uses: actions/github-script@v5
|
|
|
|
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
|
|
|
|
})
|
|
|
|
|
2023-03-11 18:04:13 +00:00
|
|
|
flatpak_release:
|
|
|
|
uses: ./.github/workflows/flatpak.yml
|
2023-03-11 18:13:40 +00:00
|
|
|
needs: release
|
2023-03-11 18:04:13 +00:00
|
|
|
with:
|
2023-03-11 19:11:09 +00:00
|
|
|
ryujinx_version: "1.1.${{ github.run_number }}"
|
2023-03-11 18:04:13 +00:00
|
|
|
secrets: inherit
|