Skip to content

Commit

Permalink
GitHub Actions build script
Browse files Browse the repository at this point in the history
  • Loading branch information
daveaglick committed Jun 8, 2020
1 parent 75c9620 commit eba170a
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@

name: Build
on:
pull_request:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest, macos-latest]
steps:
- name: Get Source
uses: actions/checkout@v2

- name: Install .NET Core SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: '3.1.x'

- name: Build and Test
run: dotnet run --project "build/Statiq.Web.Build/Statiq.Web.Build.csproj" -- test
3 changes: 1 addition & 2 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
@echo off
cd "build\Statiq.Web.Build"
dotnet run -- %*
dotnet run --project "build/Statiq.Web.Build/Statiq.Web.Build.csproj" -- %*
set exitcode=%errorlevel%
cd %~dp0
exit /b %exitcode%
2 changes: 1 addition & 1 deletion build/Statiq.Web.Build/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public static async Task<int> Main(string[] args) => await Bootstrapper
.CreateDefault(args)
.ConfigureEngine(x =>
{
x.FileSystem.RootPath /= "../../";
x.FileSystem.RootPath = new NormalizedPath(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.Parent.Parent;
x.FileSystem.OutputPath = x.FileSystem.RootPath / ArtifactsFolder;
x.FileSystem.InputPaths.Clear();
x.FileSystem.InputPaths.Add(x.FileSystem.RootPath);
Expand Down

0 comments on commit eba170a

Please sign in to comment.