diff --git a/.github/workflows/YakBuild.yml b/.github/workflows/YakBuild.yml index 8413ace..03688aa 100644 --- a/.github/workflows/YakBuild.yml +++ b/.github/workflows/YakBuild.yml @@ -8,7 +8,10 @@ on: jobs: build: - runs-on: windows-latest + strategy: + matrix: + os: [windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -18,42 +21,31 @@ jobs: - name: Restore Packages run: nuget restore Crash.sln - - uses: actions/setup-dotnet@v3 + - name: Setup .NET Core 7.0 + uses: actions/setup-dotnet@v3 with: - dotnet-version: | - 6.0 - 7.0 + dotnet-version: 7.0 - - name: Build Crash - run: dotnet build Crash.sln --configuration Release + - uses: FranzDiebold/github-env-vars-action@v2 - - name: Build Yak Package for Windows + - name: Set Framework Env Variable (Windows) + if : ${{ matrix.os == 'windows-latest' }} run: | - $config = "Release" - $in = Resolve-Path("src\Crash\bin\$config\net48") - $out = $in - - .\scripts\YakCompiler.ps1 -Path $in -DestinationPath $out -Config Release -os win - shell: powershell - - - name: Upload Windows Yak Package - uses: actions/upload-artifact@v3 - with: - name: crash-win-yak - path: src\Crash\bin\Release\net48\*.yak + echo "FRAMEWORK=net48" - - - name: Build Yak Package for Mac + - name: Set Framework Env Variable (Unix) + if : ${{ matrix.os != 'windows-latest' }} run: | - $config = "Release" - $in = Resolve-Path("src\Crash\bin\$config\net48") - $out = $in - - .\scripts\YakCompiler.ps1 -Path $in -DestinationPath $out -Config Release -os mac - shell: powershell + echo "FRAMEWORK=net7.0" - - name: Upload Mac Yak Package - uses: actions/upload-artifact@v3 + - name: Build Crash + run: dotnet build Crash.sln --configuration Release + + - id: yak + uses: crashcloud/yak-publish@main with: - name: crash-mac-yak - path: src\Crash\bin\Release\net48\*.yak + package-name: 'Crash' + token: ${{ secrets.YAK_TOKEN }} + build-path: 'src/Crash/bin/Release/${{env.framework}}' + publish: 'test' + platform: ${{ matrix.os }}