-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from AlamoEngine-Tools/develop
New Releases
- Loading branch information
Showing
22 changed files
with
209 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Releasing ModVerify | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
jobs: | ||
|
||
# Builds and tests the solution. | ||
test: | ||
uses: ./.github/workflows/test.yml | ||
|
||
pack: | ||
name: Pack | ||
needs: [test] | ||
runs-on: windows-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
- name: Create NetFramework Release | ||
run: dotnet publish .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net48 --output ./releases/net48 | ||
- name: Create Net Core Release | ||
run: dotnet publish .\src\ModVerify.CliApp\ModVerify.CliApp.csproj --configuration Release -f net8.0 --output ./releases/net8.0 | ||
- name: Upload a Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Binary Releases | ||
path: ./releases | ||
if-no-files-found: error | ||
retention-days: 1 | ||
|
||
deploy: | ||
name: Deploy | ||
if: | | ||
github.ref == 'refs/heads/main' && github.event_name == 'push' | ||
needs: [pack] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: Binary Releases | ||
path: ./releases | ||
- name: Create NET Core zip | ||
# Change into the artifacts directory to avoid including the directory itself in the zip archive | ||
working-directory: ./releases/net8.0 | ||
run: zip -r ./releases/ModVerify-Net8.zip . | ||
- uses: dotnet/[email protected] | ||
id: nbgv | ||
- name: Create GitHub release | ||
uses: softprops/action-gh-release@v2 | ||
with: | ||
name: v${{ steps.nbgv.outputs.SemVer2 }} | ||
tag_name: v${{ steps.nbgv.outputs.SemVer2 }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
generate_release_notes: true | ||
files: | | ||
./releases/net48/ModVerify.CliApp.exe | ||
./releases/ModVerify-Net8.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup> | ||
<PackageReference Include="Nerdbank.GitVersioning" Condition="!Exists('packages.config')"> | ||
<PrivateAssets>all</PrivateAssets> | ||
<Version>3.6.133</Version> | ||
</PackageReference> | ||
</ItemGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> | ||
<Costura /> | ||
</Weavers> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
namespace AET.ModVerify; | ||
|
||
public record VerificationSettings | ||
{ | ||
public static readonly VerificationSettings Default = new() | ||
{ | ||
ThrowBehavior = VerifyThrowBehavior.None | ||
}; | ||
|
||
public VerifyThrowBehavior ThrowBehavior { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
namespace AET.ModVerify; | ||
|
||
public enum VerifyThrowBehavior | ||
{ | ||
None, | ||
FinalThrow, | ||
FailFast | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/PetroglyphTools/PG.StarWarsGame.Engine/FileSystem/GameRepositoryFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
using System; | ||
|
||
namespace PG.StarWarsGame.Engine.FileSystem; | ||
|
||
internal sealed class GameRepositoryFactory(IServiceProvider serviceProvider) : IGameRepositoryFactory | ||
{ | ||
public IGameRepository Create(GameEngineType engineType, GameLocations gameLocations) | ||
{ | ||
if (engineType == GameEngineType.Eaw) | ||
throw new NotImplementedException("Empire at War is currently not supported."); | ||
return new FocGameRepository(gameLocations, serviceProvider); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
src/PetroglyphTools/PG.StarWarsGame.Engine/FileSystem/IGameRepositoryFactory.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace PG.StarWarsGame.Engine.FileSystem; | ||
|
||
public interface IGameRepositoryFactory | ||
{ | ||
IGameRepository Create(GameEngineType engineType, GameLocations gameLocations); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/PetroglyphTools/PG.StarWarsGame.Engine/GameEngineType.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
namespace PG.StarWarsGame.Engine; | ||
|
||
/// <summary> | ||
/// The type of engine can be either "Empire at War" of "Forces of Corruption" | ||
/// </summary> | ||
public enum GameEngineType | ||
{ | ||
/// <summary> | ||
/// Empire at War | ||
/// </summary> | ||
Eaw = 0, | ||
/// <summary> | ||
/// Forces of Corruption | ||
/// </summary> | ||
Foc = 1 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.