Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ on:
jobs:
ci:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for NuGet Trusted Publishing (OIDC)

steps:
- name: Checkout repository
Expand All @@ -40,10 +43,17 @@ jobs:
with:
dotnet-version: '10.0.x'

- name: NuGet login (OIDC Trusted Publishing)
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
id: nuget-login
uses: nuget/login@v1
with:
user: TimeWarp.Enterprises

- name: Run CI Pipeline
run: |
if [ "${{ github.event_name }}" == "release" ] || [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
dotnet run --file tools/dev-cli/dev.cs -- workflow --api-key "${{ secrets.PUBLISH_TO_NUGET_ORG }}"
dotnet run --file tools/dev-cli/dev.cs -- workflow --api-key "${{ steps.nuget-login.outputs.NUGET_API_KEY }}"
else
dotnet run --file tools/dev-cli/dev.cs -- workflow
fi
Expand Down
Loading