@@ -46,73 +46,73 @@ jobs:
4646 - name : " Dotnet Cake Test"
4747 run : dotnet cake --target=Test
4848 shell : pwsh
49- # - name: "Dotnet Cake Pack"
50- # run: dotnet cake --target=Pack
51- # shell: pwsh
52- # - name: "Publish Artefacts"
53- 54- # if: always()
55- # with:
56- # name: ${{matrix.os}}
57- # path: "./Artefacts"
49+ - name : " Dotnet Cake Pack"
50+ run : dotnet cake --target=Pack
51+ shell : pwsh
52+ - name : " Publish Artefacts"
53+ 54+ if : always()
55+ with :
56+ name : ${{matrix.os}}
57+ path : " ./Artefacts"
58+
59+ publish-test-results :
60+ name : " Publish Tests Results"
61+ needs : build
62+ if : always()
63+ permissions :
64+ checks : write
65+ pull-requests : write
66+ runs-on : ubuntu-latest
67+ steps :
68+ - name : " Download Artefact"
69+ 70+ with :
71+ path : " ./Artefacts"
72+ - name : " Publish Test Summary"
73+ uses : test-summary/action@v2
74+ if : always()
75+ with :
76+ paths : " ./Artefacts/*/*.xml"
77+
78+ push-github-packages :
79+ name : " Push GitHub Packages"
80+ needs : build
81+ if : github.ref == 'refs/heads/main' || github.event_name == 'release'
82+ environment :
83+ name : " GitHub Packages"
84+ url : https://github.com/TimmyMC/Schema.NET/packages
85+ permissions :
86+ packages : write
87+ runs-on : windows-latest
88+ steps :
89+ - name : " Download Artefact"
90+ 91+ with :
92+ name : " windows-latest"
93+ - name : " Dotnet NuGet Add Source"
94+ run : dotnet nuget add source https://nuget.pkg.github.com/TimmyMC/index.json --name GitHub --username TimmyMC --password ${{secrets.GITHUB_TOKEN}}
95+ shell : pwsh
96+ - name : " Dotnet NuGet Push"
97+ run : dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
98+ shell : pwsh
5899
59- # publish-test-results:
60- # name: "Publish Tests Results"
61- # needs: build
62- # if: always()
63- # permissions:
64- # checks: write
65- # pull-requests: write
66- # runs-on: ubuntu-latest
67- # steps:
68- # - name: "Download Artefact"
69- 70- # with:
71- # path: "./Artefacts"
72- # - name: "Publish Test Summary"
73- # uses: test-summary/action@v2
74- # if: always()
75- # with:
76- # paths: "./Artefacts/*/*.xml"
77- #
78- # push-github-packages:
79- # name: "Push GitHub Packages"
80- # needs: build
81- # if: github.ref == 'refs/heads/main' || github.event_name == 'release'
82- # environment:
83- # name: "GitHub Packages"
84- # url: https://github.com/RehanSaeed/Schema.NET/packages
85- # permissions:
86- # packages: write
87- # runs-on: windows-latest
88- # steps:
89- # - name: "Download Artefact"
90- 91- # with:
92- # name: "windows-latest"
93- # - name: "Dotnet NuGet Add Source"
94- # run: dotnet nuget add source https://nuget.pkg.github.com/RehanSaeed/index.json --name GitHub --username RehanSaeed --password ${{secrets.GITHUB_TOKEN}}
95- # shell: pwsh
96- # - name: "Dotnet NuGet Push"
97- # run: dotnet nuget push .\*.nupkg --api-key ${{ github.token }} --source GitHub --skip-duplicate
98- # shell: pwsh
99- #
100- # push-nuget:
101- # name: "Push NuGet Packages"
102- # needs: build
103- # if: github.event_name == 'release'
104- # environment:
105- # name: "NuGet"
106- # url: https://www.nuget.org/packages/Schema.NET
107- # runs-on: windows-latest
108- # steps:
109- # - name: "Download Artefact"
110- 111- # with:
112- # name: "windows-latest"
113- # - name: "Dotnet NuGet Push"
114- # run: |
115- # Get-ChildItem .\ -Filter *.nupkg |
116- # Where-Object { !$_.Name.Contains('preview') } |
117- # ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} }
118- # shell: pwsh
100+ push-nuget :
101+ name : " Push NuGet Packages"
102+ needs : build
103+ if : github.event_name == 'release'
104+ environment :
105+ name : " NuGet"
106+ url : https://www.nuget.org/packages/Schema.NET
107+ runs-on : windows-latest
108+ steps :
109+ - name : " Download Artefact"
110+ 111+ with :
112+ name : " windows-latest"
113+ - name : " Dotnet NuGet Push"
114+ run : |
115+ Get-ChildItem .\ -Filter *.nupkg |
116+ Where-Object { !$_.Name.Contains('preview') } |
117+ ForEach-Object { dotnet nuget push $_ --source https://api.nuget.org/v3/index.json --skip-duplicate --api-key ${{secrets.NUGET_API_KEY}} }
118+ shell : pwsh
0 commit comments