SharpAdb / AdvancedSharpAdbClient

AdvancedSharpAdbClient is a .NET library that allows .NET, Mono and Unity applications to communicate with Android devices. It's improved version of SharpAdbClient.
https://sharpadb.github.io
Apache License 2.0
201 stars 54 forks source link

Configure workflow for auto releasing #69

Closed yungd1plomat closed 1 year ago

yungd1plomat commented 1 year ago

Describe your feature request

Need 2 workflows:

  1. For pull requests on main branch - build, test and upload artifacts
  2. For push on main branch - build, test and push to nuget

Example

How important is this to you?

Important

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

yungd1plomat commented 1 year ago

I'll take care of this as soon as I'm available.

wherewhere commented 1 year ago

I think it is better to manually publish nuget because it can't be deleted after published. So it should be very carefully. It's better to publish to GitHub nuget or just upload artifact.

yungd1plomat commented 1 year ago

I think it is better to manually publish nuget because it can't be deleted after published. So it should be very carefully. It's better to publish to GitHub nuget or just upload artifact.

Ok

wherewhere commented 1 year ago

The flowchart of action:

    flowchart LR
        subgraph Test
        WindowsTest(build-and-test-windows-latest)
        UbuntuTest(build-and-test-ubuntu-latest)
        MacOSTest(build-and-test-macos-latest)
        end
        Start([Start]) -->  WindowsTest
        Start -->  UbuntuTest
        Start -->  MacOSTest
        WindowsTest --> IsTestSuccess{Is success?}
        UbuntuTest --> IsTestSuccess{Is success?}
        MacOSTest --> IsTestSuccess{Is success?}
        IsTestSuccess -->|True| PublishNuget(build-and-publish)
        PublishNuget --> End([End])

Which in build-and-publish:

    flowchart LR
        Start([Start]) -->  IsMain{Is main branch?}
        IsMain -->|True| Setup(Setup .NET Core App)
        Setup --> Restore(Install dependencies)
        Restore --> Build("Build
        `FullTargets` should be true")
        Build --> BuildNuget(Build the NuGet package)
        BuildNuget --> Publish(Publish to Github Packages)
        Publish --> Upload(Upload artifact)
        Upload --> End([End])