|
| 1 | +name: publish Erdmier.DomainCore.Mediator to NuGet |
| 2 | +on: |
| 3 | + workflow_dispatch: |
| 4 | + pull_request: |
| 5 | + branches: |
| 6 | + - release/mediator # Your default release branch |
| 7 | + paths: |
| 8 | + - 'Source/MediatorCore/**' |
| 9 | +jobs: |
| 10 | + publish: |
| 11 | + name: list Erdmier.DomainCore.Mediator on nuget.org |
| 12 | + runs-on: windows-latest |
| 13 | + steps: |
| 14 | + - uses: actions/checkout@v4 |
| 15 | + |
| 16 | + # Required for a specific dotnet version that doesn't come with ubuntu-latest / windows-latest |
| 17 | + # Visit bit.ly/2synnZl to see the list of SDKs that are pre-installed with ubuntu-latest / windows-latest |
| 18 | + - name: Setup .NET Core |
| 19 | + uses: actions/setup-dotnet@v4 |
| 20 | + with: |
| 21 | + dotnet-version: | |
| 22 | + 8.0.x |
| 23 | + 9.0.x |
| 24 | +
|
| 25 | + # Publish |
| 26 | + - name: publish on version change |
| 27 | + uses: alirezanet/[email protected] |
| 28 | + with: |
| 29 | + PROJECT_FILE_PATH: Source/MediatorCore/MediatorCore.csproj # Relative to the repository root |
| 30 | + VERSION_FILE_PATH: Source/MediatorCore/MediatorCore.csproj # Filepath with version info, relative to the repository root. Defaults to the project file. |
| 31 | + VERSION_REGEX: <Version>(.*)<\/Version> # Regex pattern to extract version info in a capturing group |
| 32 | + TAG_COMMIT: true # Flag to enable / disable git tagging |
| 33 | + TAG_FORMAT: MediatorCore-v* # Format of the git tag, [*] gets replaced with the version |
| 34 | + NUGET_KEY: ${{secrets.NUGET_API_KEY}} # nuget.org API key |
| 35 | +# This merged the branch being merged into the release branch into main - it did not merge the release branch itself into main |
| 36 | +# sync-branches: |
| 37 | +# runs-on: ubuntu-latest |
| 38 | +# steps: |
| 39 | +# - uses: actions/checkout@v4 |
| 40 | +# |
| 41 | +# - name: merge release into main |
| 42 | +# uses: devmasx/merge-branch@master |
| 43 | +# with: |
| 44 | +# type: now |
| 45 | +# target_branch: main |
| 46 | +# message: Merge release/core into main |
| 47 | +# github_token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments