Skip to content

CNX-9308 CNX-9632 Moving to Github Actions for DUI3 #12

CNX-9308 CNX-9632 Moving to Github Actions for DUI3

CNX-9308 CNX-9632 Moving to Github Actions for DUI3 #12

Workflow file for this run

name: .NET Build
on:
pull_request: # Run build on every pull request that is not to main/dev
branches-ignore:
- main
- dev
workflow_call:
outputs:
version:
value: ${{ jobs.build.outputs.version }}
jobs:
build:
runs-on: windows-latest
outputs:
version: ${{ steps.set-version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 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: Install GitVersion
# uses: gittools/actions/gitversion/[email protected]
# with:
# versionSpec: "5.x"
# - name: Determine Version
# id: version
# uses: gittools/actions/gitversion/[email protected]
- name: ⚒️ Run build
run: ./build.ps1
env:
NUGET_CERT_REVOCATION_MODE: offline
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ env.GitVersion_AssemblySemFileVer }}
path: output/*.*
compression-level: 0 # no compression
- id: set-version
name: Set version to output
run: echo "version=${{env.GitVersion_FullSemVer}}" >> "$GITHUB_OUTPUT"