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 @@ -146,7 +146,7 @@ jobs:

# Release publishing job
release:
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'release' && inputs.confirm == 'release') || (github.event_name == 'workflow_dispatch' && inputs.mode == 'probe')
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down Expand Up @@ -179,6 +179,7 @@ jobs:
dotnet-version: '8.0.403'

- name: Extract version from source/Directory.Build.props
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
id: extract_version
run: |
[xml]$xml = Get-Content -Path "source/Directory.Build.props"
Expand All @@ -188,6 +189,7 @@ jobs:
shell: pwsh

- name: Validate release version matches tag
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
if: github.event_name == 'release'
run: |
$releaseVersion = "${{ steps.extract_version.outputs.version }}"
Expand All @@ -204,6 +206,7 @@ jobs:
shell: pwsh

- name: Create NuGet packages
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
run: dotnet run --project ./scripts/package.cs
working-directory: ${{ github.workspace }}

Expand All @@ -214,7 +217,12 @@ jobs:
with:
user: TimeWarp.Enterprises

- name: Trusted publishing probe result
if: github.event_name == 'workflow_dispatch' && inputs.mode == 'probe'
run: echo "Trusted publishing OK — OIDC exchange succeeded for this repo + workflow.yml."

- name: Publish TimeWarp.State to NuGet
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'release' && inputs.confirm == 'release')
run: |
$packagePath = "./artifacts/packages/TimeWarp.State.*.nupkg"
Expand All @@ -225,6 +233,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Publish TimeWarp.State.Plus to NuGet
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'release' && inputs.confirm == 'release')
run: |
$packagePath = "./artifacts/packages/TimeWarp.State.Plus.*.nupkg"
Expand All @@ -235,6 +244,7 @@ jobs:
working-directory: ${{ github.workspace }}

- name: Publish TimeWarp.State.Policies to NuGet
if: github.event_name != 'workflow_dispatch' || inputs.mode != 'probe'
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'release' && inputs.confirm == 'release')
run: |
$packagePath = "./artifacts/packages/TimeWarp.State.Policies.*.nupkg"
Expand Down