Skip to content

Enhance CI workflow with full git history and tags #22

Enhance CI workflow with full git history and tags

Enhance CI workflow with full git history and tags #22

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout (full history + tags)
uses: actions/checkout@v4
with:
fetch-depth: 0 # full history (not shallow)
fetch-tags: true # include tags for NBGV
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# (Optional) sanity check so you can see history/tags in logs
- name: Show git state
run: |
git --version
git log --oneline -n 5 || true
git tag --list | head -n 20 || true
- name: Restore
run: dotnet restore DotNetPythonEmbed.sln
- name: Build
run: dotnet build DotNetPythonEmbed.sln --configuration Release --no-restore
- name: Test
run: dotnet test DotNetPythonEmbed.sln --configuration Release --no-build --verbosity normal
- name: Pack
run: dotnet pack src/DotNetPythonEmbed/DotNetPythonEmbed.csproj --configuration Release --no-build --output ./artifacts
- name: Upload package artifact
uses: actions/upload-artifact@v4
with:
name: nuget-package
path: artifacts
if-no-files-found: error