Merge pull request #11 from TimeWarpEngineering/Cramer/2025-12-22/dev #34
This file contains hidden or 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: CI/CD | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'source/**' | |
| - 'tools/**' | |
| - '.github/workflows/**' | |
| - 'Directory.Build.props' | |
| - 'Directory.Packages.props' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'source/**' | |
| - 'tools/**' | |
| - '.github/workflows/**' | |
| - 'Directory.Build.props' | |
| - 'Directory.Packages.props' | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| ci: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write # Required for NuGet Trusted Publishing (OIDC) | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Required for version detection | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '10.0.x' | |
| - name: NuGet login (OIDC Trusted Publishing) | |
| if: github.event_name == 'release' | |
| id: nuget-login | |
| uses: nuget/login@v1 | |
| with: | |
| user: TimeWarp.Enterprises | |
| - name: Run CI Pipeline | |
| run: | | |
| if [ "${{ github.event_name }}" == "release" ]; then | |
| dotnet run tools/dev-cli/dev.cs -- ci --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}" | |
| else | |
| dotnet run tools/dev-cli/dev.cs -- ci | |
| fi | |
| - name: Upload Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: Packages-${{ github.run_number }} | |
| path: artifacts/packages/*.nupkg | |
| if-no-files-found: ignore |