Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 20 additions & 10 deletions .github/workflows/Build & Test.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
name: Build & Test
name: Build, Test & Package

on:
push:
branches:
- master
tags:
- '*'
pull_request:

permissions: read-all
permissions:
contents: write

jobs:
build-and-test:
build:
runs-on: windows-latest
steps:
- name: Checkout
Expand All @@ -27,8 +30,7 @@ jobs:
uses: darenm/Setup-VSTest@v1

- name: Navigate to Solution Folder
run: |
cd $GITHUB_WORKSPACE
run: cd $GITHUB_WORKSPACE

- name: Cache NuGet Packages
uses: actions/cache@v3
Expand All @@ -39,13 +41,21 @@ jobs:
${{ runner.os }}-nuget-

- name: Restore Packages
run: |
nuget restore ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.sln
run: nuget restore ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.sln

- name: Build Solution
run: |
msbuild.exe ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.sln /p:platform="Any CPU" /p:configuration="Release"
run: msbuild.exe ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.sln /p:platform="Any CPU" /p:configuration="Release"

- name: Run Tests
run: vstest.console.exe ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.Tests/bin/Release/net6.0/Enjin.Platform.Sdk.Tests.dll

- name: Build NuGet Packages
run: |
vstest.console.exe ./src/Enjin.Platform.Sdk/Enjin.Platform.Sdk.Tests/bin/Release/net6.0/Enjin.Platform.Sdk.Tests.dll
cd ./src/Enjin.Platform.Sdk
dotnet pack --configuration Release --output ./nuget-packages/

- name: Upload Artifcats
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./src/Enjin.Platform.Sdk/nuget-packages/*.nupkg