Skip to content

Commit c204536

Browse files
Merge pull request #61 from StuartFerguson/task/#49_eventsasnuget
Publish domain events as nuget and prerelease nuget workflow
2 parents 590e696 + 1bb879e commit c204536

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

.github/workflows/createrelease.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,5 +119,7 @@ jobs:
119119
run: |
120120
dotnet pack "TransactionProcessor.Client\TransactionProcessor.Client.csproj" /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} --output Nugets
121121
dotnet nuget push Nugets/TransactionProcessor.Client.${{ steps.get_version.outputs.VERSION }}.nupkg --api-key ${{ secrets.MYGET_APIKEY }} --source https://www.myget.org/F/transactionprocessing/api/v2/package
122+
dotnet pack "TransactionProcessor.Transaction.DomainEvents\TransactionProcessor.Transaction.DomainEvents.csproj" /p:PackageVersion=${{ steps.get_version.outputs.VERSION }} --output Nugets
123+
dotnet nuget push Nugets/TransactionProcessor.Transaction.DomainEvents.${{ steps.get_version.outputs.VERSION }}.nupkg --api-key ${{ secrets.MYGET_APIKEY }} --source https://www.myget.org/F/transactionprocessing/api/v2/package
122124
123125
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Publish Pre-Release Nuget
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- master
8+
9+
jobs:
10+
build:
11+
name: "Publish Pre-Release Nugets"
12+
env:
13+
ASPNETCORE_ENVIRONMENT: "Production"
14+
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v1
19+
20+
- name: Restore Nuget Packages
21+
run: dotnet restore TransactionProcessor.sln --source https://api.nuget.org/v3/index.json --source https://www.myget.org/F/transactionprocessing/api/v3/index.json
22+
23+
- name: Build Code
24+
run: dotnet build TransactionProcessor.sln --configuration Release
25+
26+
- name: Get the last version
27+
id: get_version
28+
run: echo ::set-output name=VERSION::$(git tag --sort=committerdate | tail -1)
29+
30+
- name: Print Version
31+
id: next_version
32+
run: echo ::set-output name=VERSION::${{ steps.get_version.outputs.VERSION }}.$GITHUB_RUN_NUMBER
33+
34+
- name: Build and Publish Nuget Packages
35+
run: |
36+
dotnet pack "TransactionProcessor.Client\TransactionProcessor.Client.csproj" /p:PackageVersion=${{ steps.next_version.outputs.VERSION }} --output Nugets
37+
dotnet nuget push Nugets/TransactionProcessor.Client.${{ steps.next_version.outputs.VERSION }}.nupkg --api-key ${{ secrets.MYGET_APIKEY }} --source https://www.myget.org/F/transactionprocessing/api/v2/package
38+
dotnet pack "TransactionProcessor.Transaction.DomainEvents\TransactionProcessor.Transaction.DomainEvents.csproj" /p:PackageVersion=${{ steps.next_version.outputs.VERSION }} --output Nugets
39+
dotnet nuget push Nugets/TransactionProcessor.Transaction.DomainEvents.${{ steps.next_version.outputs.VERSION }}.nupkg --api-key ${{ secrets.MYGET_APIKEY }} --source https://www.myget.org/F/transactionprocessing/api/v2/package
40+
41+

0 commit comments

Comments
 (0)