Skip to content

Release Dev to Main #161

Release Dev to Main

Release Dev to Main #161

Workflow file for this run

name: Build
on:
pull_request:
types: [ assigned, opened, synchronize, reopened ]
push:
branches:
- 'feature/**'
jobs:
test:
runs-on: windows-latest
name: Testing
strategy:
matrix:
dotnet: [ 'netcoreapp3.1', 'net6.0', 'net7.0', 'net462', 'net48' ]
steps:
- name: Checkout code base
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Run tests
run: dotnet test --verbosity normal -f ${{ matrix.dotnet }}
build:
runs-on: windows-latest
name: Building
strategy:
matrix:
dotnet: [ 'netcoreapp3.1', 'net6.0', 'net7.0', 'net462', 'net48' ]
steps:
- name: Checkout code base
uses: actions/checkout@v2
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Cleaning
run: dotnet clean
- name: Restore NuGet packages
run: dotnet restore ExpressionEngine.sln
- name: Build solution
run: dotnet build -o build/${{ matrix.dotnet }} -c Release --no-restore -m:1 -f ${{ matrix.dotnet }}
- name: Cache build artifacts
uses: actions/cache@v2
with:
path: build/${{ matrix.dotnet }}
key: ${{ runner.os }}-build-${{ matrix.dotnet }}
publish:
runs-on: windows-latest
name: Generate docs and publish artifacts
needs: ['build']
steps:
- name: Get cache - net6.0
uses: actions/cache@v2
with:
path: build/net6.0
key: ${{ runner.os }}-build-net6.0
- name: Get cache - net7.0
uses: actions/cache@v2
with:
path: build/net7.0
key: ${{ runner.os }}-build-net7.0
- uses: actions/setup-dotnet@v3
with:
dotnet-version: '7.0.x'
- name: Install Xml to Markdown tool
run: dotnet new tool-manifest && dotnet tool install EAVFW.Extensions.Docs.TransformToMarkdown
- name: Generate docs
run: dotnet tool run tomd --input build/net7.0/ExpressionEngine.xml --output Documentation.md
- name: Archive build to artifacts
uses: actions/upload-artifact@v2.3.1
with:
name: Build
path: |
build/net6.0/
build/net7.0/
Documentation.md
retention-days: 5