From a5c75d1270c8c63b251607ef845741dc7658b4e6 Mon Sep 17 00:00:00 2001 From: Razmoth <32140579+Razmoth@users.noreply.github.com> Date: Fri, 26 May 2023 00:04:24 +0400 Subject: [PATCH] Create build.yml --- .github/workflows/build.yml | 68 +++++++++++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..dbd0d7a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,68 @@ +name: Build + +on: + push: + branches: + - 'dev' + paths-ignore: + - '**/LICENSE' + - '**/README.md' + - '**/build.yml' + - '**/.gitignore' + - '**/.gitattributes' + workflow_dispatch: +jobs: + build: + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + - uses: microsoft/setup-msbuild@v1.1 + + - name: Download FBX SDK + run: | + md fbx + cd fbx + Invoke-WebRequest "https://damassets.autodesk.net/content/dam/autodesk/www/adn/fbx/2020-3-2/fbx202032_fbxsdk_vs2019_win.exe" -OutFile "fbxsdk.exe" + Start-Process -FilePath "fbxsdk.exe" /S -Wait + Invoke-WebRequest "https://damassets.autodesk.net/content/dam/autodesk/www/adn/fbx/2020-3-2/fbx202032_fbxsdk_vs2019_pdbs.exe" -OutFile "fbxpdb.exe" + Start-Process -FilePath "fbxpdb.exe" /S -Wait + cd .. + - name: Nuget Restore + run: nuget restore + + - name: Build .Net6 + run: msbuild /t:AssetStudioGUI:publish /p:Configuration=Release /p:TargetFramework=net6.0-windows /p:SelfContained=false /verbosity:minimal + + - name: Build .Net7 + run: msbuild /t:AssetStudioGUI:publish /p:Configuration=Release /p:TargetFramework=net7.0-windows /p:SelfContained=false /verbosity:minimal + + - name: Build .Net6 CLI + run: msbuild /t:AssetStudioCLI:publish /p:Configuration=Release /p:TargetFramework=net6.0-windows /p:SelfContained=false /verbosity:minimal + + - name: Build .Net7 CLI + run: msbuild /t:AssetStudioCLI:publish /p:Configuration=Release /p:TargetFramework=net7.0-windows /p:SelfContained=false /verbosity:minimal + + - name: Upload .Net6 Artifact + uses: actions/upload-artifact@v2 + with: + name: net6.0-windows + path: AssetStudioGUI/bin/Release/net6.0-windows/publish + + - name: Upload .Net7 Artifact + uses: actions/upload-artifact@v2 + with: + name: net7.0-windows + path: AssetStudioGUI/bin/Release/net7.0-windows/publish + + - name: Upload .Net6 CLI Artifact + uses: actions/upload-artifact@v2 + with: + name: net6.0-windows + path: AssetStudioGUI/bin/Release/net6.0-windows/publish + + - name: Upload .Net7 CLI Artifact + uses: actions/upload-artifact@v2 + with: + name: net7.0-windows + path: AssetStudioGUI/bin/Release/net7.0-windows/publish