Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

EXPOSURES: Add support for specifying the condition which can prevent a task from running #46

Open
icnocop opened this issue Apr 1, 2023 · 0 comments

Comments

@icnocop
Copy link

icnocop commented Apr 1, 2023

For example, pending #43

new NuGetPushTaskBuilder()
    .WithName("Publish")
    .If("${{ github.event.inputs.publish == 'true' }}") // something like this should be added
    .WithSearchPath(@"**\*.nupkg")
    .WithApiKey("${{ secrets.NUGET_API_KEY }}")
    .WithDestination("https://api.nuget.org/v3/index.json")
    .Build()

should generate the following YAML:

- name: Publish
   if: ${{ github.event.inputs.publish == 'true' }}
   run: dotnet nuget push "**\*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source "https://api.nuget.org/v3/index.json"

I'm not sure if it should be If, WithIf, or maybe something else.

@icnocop icnocop changed the title Add support for specifying the condition which can prevent a task from running EXPOSURES: Add support for specifying the condition which can prevent a task from running Apr 4, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant