Files
velopack/.github/workflows/build.yml
2022-05-14 11:38:40 +01:00

73 lines
2.3 KiB
YAML

name: Build Squirrel
on: [push, pull_request]
env:
DOTNET_VERSION: '6.0.202'
jobs:
build-windows:
name: Build Windows
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install NGBV
run: dotnet tool install --tool-path . nbgv
- name: Build
shell: pwsh
run: .\build.ps1
# - name: Create NuGet Package
# shell: pwsh
# run: .\pack.ps1
- name: Test
run: dotnet test test\Squirrel.Tests.csproj -l "console;verbosity=detailed"
# - name: "Upload Tools"
# uses: actions/upload-artifact@v3
# with:
# path: .\build\SquirrelTools*.zip
# if-no-files-found: error
# https://stackoverflow.com/questions/63817052/github-actions-run-step-only-for-certain-pull-request-base-branches
# - name: "Upload NuGet Package"
# uses: actions/upload-artifact@v3
# with:
# path: .\build\Clowd.Squirrel*.nupkg
# if-no-files-found: error
# - name: Publish to GitHub Packages
# if: ${{ github.ref == 'ref/head/develop' }}
# run: dotnet nuget push .\build\Clowd.Squirrel*.nupkg
- name: Upload Windows Artifacts
uses: actions/upload-artifact@v3
with:
name: windows-tools
path: .\build\publish\*
build-macos:
name: Build OSX
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Build SquirrelMac
run: |
dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Squirrel.CommandLine.OSX/Squirrel.CommandLine.OSX.csproj -o ./bundle
ls -la ./bundle
- name: Build UpdateMac
run: |
dotnet publish -v minimal --self-contained -c Release -r osx.10.12-x64 ./src/Update.OSX/Update.OSX.csproj -o ./bundle
ls -la ./bundle
- name: Upload MacOS Artifacts
uses: actions/upload-artifact@v3
with:
name: osx-tools
path: ./bundle/*