|
1 | 1 | name: Release |
2 | 2 |
|
3 | 3 | on: |
4 | | - release: |
5 | | - types: |
| 4 | + release: |
| 5 | + types: |
6 | 6 | - published |
7 | 7 |
|
8 | 8 | jobs: |
9 | | - publish-nuget: |
10 | | - runs-on: windows-latest |
| 9 | + publish-core: |
| 10 | + runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | | - - uses: actions/checkout@v4 |
13 | | - - name: Setup .NET |
14 | | - uses: actions/setup-dotnet@v4 |
15 | | - with: |
16 | | - dotnet-version: 8.0.x |
17 | | - cache: false |
18 | | - - name: Restore |
19 | | - run: dotnet restore MbSoftLab.TemplateEngine.Core.sln |
20 | | - - name: Build |
21 | | - run: dotnet build MbSoftLab.TemplateEngine.Core.sln --configuration Release --no-restore |
22 | | - - name: Pack Core and Razor projects |
23 | | - run: | |
24 | | - dotnet pack MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj --configuration Release --no-restore |
25 | | - dotnet pack MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj --configuration Release --no-restore |
26 | | - - name: Push Core package to NuGet |
27 | | - run: dotnet nuget push MbSoftLab.TemplateEngine.Core/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
28 | | - - name: Push Razor package to NuGet |
29 | | - run: dotnet nuget push MbSoftLab.TemplateEngine.Core.Razor/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 12 | + - uses: actions/checkout@v4 |
| 13 | + - name: Setup .NET |
| 14 | + uses: actions/setup-dotnet@v4 |
| 15 | + with: |
| 16 | + dotnet-version: 8.0.x |
| 17 | + - name: Restore |
| 18 | + run: dotnet restore MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj |
| 19 | + - name: Build |
| 20 | + run: dotnet build MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj --configuration Release --no-restore |
| 21 | + - name: Pack |
| 22 | + run: dotnet pack MbSoftLab.TemplateEngine.Core/MbSoftLab.TemplateEngine.Core.csproj --configuration Release --no-restore |
| 23 | + - name: Publish to NuGet |
| 24 | + run: dotnet nuget push MbSoftLab.TemplateEngine.Core/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
| 25 | + |
| 26 | + publish-razor: |
| 27 | + runs-on: ubuntu-latest |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - name: Setup .NET |
| 31 | + uses: actions/setup-dotnet@v4 |
| 32 | + with: |
| 33 | + dotnet-version: 8.0.x |
| 34 | + - name: Restore |
| 35 | + run: dotnet restore MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj |
| 36 | + - name: Build |
| 37 | + run: dotnet build MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj --configuration Release --no-restore |
| 38 | + - name: Pack |
| 39 | + run: dotnet pack MbSoftLab.TemplateEngine.Core.Razor/MbSoftLab.TemplateEngine.Core.Razor.csproj --configuration Release --no-restore |
| 40 | + - name: Publish to NuGet |
| 41 | + run: dotnet nuget push MbSoftLab.TemplateEngine.Core.Razor/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate |
0 commit comments