CNX-9308 CNX-9632 Moving to Github Actions for DUI3 #14
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: .NET Build and Publish | |
on: | |
pull_request: | |
branches: ["dui3/alpha"] | |
push: | |
branches: ["main"] | |
permissions: | |
contents: write | |
jobs: | |
build-and-publish: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
filter: tree:0 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7.x.x | |
- name: NuGet Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.nuget/packages | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
- name: Format | |
run: ./build.ps1 format | |
- name: Version | |
id: version | |
run: ./build.ps1 version | |
- name: Restore | |
run: ./build.ps1 restore | |
- name: Add msbuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Build | |
env: | |
VERSION: ${{steps.version.outputs.version}} | |
run: ./build.ps1 build | |