From 14acd64f2e93af6e242ce97015d2ae6efb7d2abc Mon Sep 17 00:00:00 2001 From: PTKu <61538034+PTKu@users.noreply.github.com> Date: Tue, 28 Jan 2025 13:13:45 +0100 Subject: [PATCH] wf test --- .github/workflows/dev.yml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/.github/workflows/dev.yml b/.github/workflows/dev.yml index ff7c5874..3b49a9e1 100644 --- a/.github/workflows/dev.yml +++ b/.github/workflows/dev.yml @@ -8,7 +8,12 @@ on: - 'cake/**' - '.github/**' workflow_dispatch: - + inputs: + publish: + type: boolean + required: false + default: false + description: "Set to 'true' to publish packages" jobs: build: strategy: @@ -29,7 +34,7 @@ jobs: - name: "Run build script" env: GH_TOKEN : ${{ secrets.GH_TOKEN }} - run: dotnet run --project cake/Build.csproj --do-test true --do-pack true --test-level 2 --do-publish true --framework net9.0 + run: dotnet run --project cake/Build.csproj --do-test --do-pack --test-level 2 --framework net9.0 - name: Test Report uses: dorny/test-reporter@v1 if: success() || failure() @@ -37,4 +42,10 @@ jobs: name: Test report path: 'TestResults/*.xml' reporter: dotnet-trx + - name: "Publish packages" + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.publish == 'true' }} + env: + GH_TOKEN: ${{ secrets.GH_TOKEN }} + GH_USER: ${{ secrets.GH_USER }} + run: dotnet run --project cake/Build.csproj --do-publish