Add GitHub Actions configuration (#201)

* new build system based on NUKE build
* support test running on Linux
This commit is contained in:
Marko Lahma
2021-08-02 17:54:41 +03:00
committed by GitHub
parent 9d7325bd67
commit ca2bf1e889
100 changed files with 1147 additions and 53007 deletions

41
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: ci
on:
push:
branches:
- main
paths-ignore:
- 'doc/**'
- '*.md'
pull_request:
branches:
- main
paths-ignore:
- 'doc/**'
- '*.md'
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Run './build.cmd ci'
run: ./build.cmd ci
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run './build.cmd ci'
run: ./build.sh ci
publish:
runs-on: ubuntu-latest
needs: [ build-windows, build-linux ]
steps:
- uses: actions/checkout@v2
- name: Publish
run: ./build.sh publish
env:
NuGetApiKey: ${{ secrets.NUGET_API_KEY }}

39
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,39 @@
name: Publish
on:
push:
tags:
- 'v*.*.*'
jobs:
build:
runs-on: ubuntu-latest
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: 1
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Setup dotnet 2.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 2.1.*
- name: Setup dotnet 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.*
- name: Setup dotnet 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.*
- name: Test
run: ./build.cmd ci test pack
- name: Push with dotnet
run: dotnet nuget push artifacts/*.*nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json