Skip to content

Commit

Permalink
bootstrap build
Browse files Browse the repository at this point in the history
  • Loading branch information
ariasemis committed Mar 24, 2021
1 parent f4d3e66 commit e2b11e1
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,8 @@ jobs:
restore-keys: |
${{ runner.OS }}-nuget-
${{ runner.OS }}-
- name: 🔨 Restore tools
run: dotnet tool restore
- name: 🧪 Build
run: dotnet fake build --target all
- name: 🔨 Build
run: .\build.ps1 --target all
- name: 📦 Upload Artifact
uses: actions/upload-artifact@v2
with:
Expand Down
13 changes: 13 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@

$ErrorActionPreference="Stop"

if (!(Get-Command dotnet -ErrorAction SilentlyContinue))
{
# Install .NET Core (https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script)
&powershell -NoProfile -ExecutionPolicy unrestricted -Command "[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12; &([scriptblock]::Create((Invoke-WebRequest -UseBasicParsing 'https://dot.net/v1/dotnet-install.ps1'))) -Channel Current"
}

dotnet tool restore
dotnet fake build @Args

exit $LASTEXITCODE;
13 changes: 13 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

set -e -o pipefail

if ! command -v dotnet &> /dev/null
then
# Install .NET Core (https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-install-script)
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel Current
# PATH="~/.dotnet:$PATH"
fi

dotnet tool restore
dotnet fake "$@"

0 comments on commit e2b11e1

Please sign in to comment.