Skip to content

Switch to Artifacts output structure + Add CI build attestation #330

Switch to Artifacts output structure + Add CI build attestation

Switch to Artifacts output structure + Add CI build attestation #330

Workflow file for this run

name: .NET Build & Test
permissions:
contents: read
id-token: write
attestations: write
on:
push:
paths-ignore:
- 'nodsoft_moltenobsidian_web/**'
- 'nodsoft_moltenobsidian_ssg_client/**'
pull_request:
workflow_call:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
- uses: dotnet/[email protected]
id: nbgv
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore
- name: Test
run: dotnet test --no-build --verbosity normal
- name: Pack
run: dotnet pack
- name: Attest build provenance for .nupkgs
uses: actions/attest-build-provenance@v1
with:
subject-path: '**/artifacts/**/*.nupkg'
- name: Publish debug artifacts
uses: actions/upload-artifact@v2
with:
name: debug-artifacts
path: '**/artifacts/**'