Replace project and .props references in GH actions deploy workflow

This commit is contained in:
Salman Ahmed
2022-12-16 17:16:37 +03:00
parent f01a18c7ab
commit 1c73b660af
2 changed files with 25 additions and 7 deletions

View File

@@ -72,24 +72,24 @@ jobs:
pack-template:
name: Pack (Templates)
runs-on: windows-latest
runs-on: ubuntu-latest
needs: [check-if-tag]
defaults:
run:
shell: powershell
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set Artifacts Directory
id: artifactsPath
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}\artifacts"
run: echo "::set-output name=NUGET_ARTIFACTS::${{github.workspace}}/artifacts"
- name: Install .NET 6.0.x
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
- name: Replace Project References
run: osu.Framework.Templates/replace-references.sh ${{needs.check-if-tag.outputs.version}}
- name: Pack (Template)
run: dotnet pack -c Release osu.Framework.Templates /p:Configuration=Release /p:Version=${{needs.check-if-tag.outputs.version}} /p:GenerateDocumentationFile=true /p:NoDefaultExcludes=true -o ${{steps.artifactsPath.outputs.nuget_artifacts}}
@@ -119,7 +119,7 @@ jobs:
with:
dotnet-version: "6.0.x"
- name: Restore .NET workloads
- name: Restore .NET Workloads
run: dotnet workload restore
- name: Pack (Android Framework)
@@ -151,7 +151,7 @@ jobs:
with:
dotnet-version: "6.0.x"
- name: Restore .NET workloads
- name: Restore .NET Workloads
run: dotnet workload restore
- name: Pack (iOS Framework)

View File

@@ -0,0 +1,18 @@
game_projects=(./**/**/**/*.Game.csproj)
ios_projects=(./**/**/**/*.iOS.csproj)
cd "$(dirname "$0")"
for game_project in ${game_projects[@]}
do
dotnet remove ${game_project} reference ../osu.Framework/osu.Framework.csproj
dotnet add $game_project package ppy.osu.Framework -v $1 --no-restore
done
for ios_project in ${ios_projects[@]}
do
dotnet remove $ios_project reference ../osu.Framework.iOS/osu.Framework.iOS.csproj
dotnet add $ios_project package ppy.osu.Framework.iOS -v $1 --no-restore
done
sed -i '/osu.Framework.iOS.props/d' ./**/**/**/*.iOS.csproj