|
14 | 14 | name: .NET Core ${{ matrix.dotnet }} |
15 | 15 |
|
16 | 16 | runs-on: ubuntu-latest |
| 17 | + env: |
| 18 | + DOTNET_NOLOGO: true |
17 | 19 | outputs: |
18 | 20 | packageAndVersion: ${{ steps.get_version.outputs.packageAndVersion }} |
19 | 21 | version: ${{ steps.get_version.outputs.version }} |
@@ -62,20 +64,20 @@ jobs: |
62 | 64 | if-no-files-found: error |
63 | 65 |
|
64 | 66 | - name: Setup .NET Core for GPR |
65 | | - if: success() && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
| 67 | + if: success() && github.repository_owner == 'TheConstructor' && github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
66 | 68 | uses: actions/setup-dotnet@v1 |
67 | 69 | with: |
68 | 70 | dotnet-version: ${{matrix.dotnet}} |
69 | | - source-url: https://nuget.pkg.github.com/TheConstructor/index.json |
| 71 | + source-url: https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json |
70 | 72 | env: |
71 | 73 | NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}} |
72 | 74 | - name: Publish the package to GPR |
73 | | - if: success() && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
| 75 | + if: success() && github.repository_owner == 'TheConstructor' && github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
74 | 76 | run: dotnet nuget push System.Text.Json.Extensions/bin/Release/*.nupkg |
75 | 77 |
|
76 | 78 | - name: Create Release |
77 | 79 | id: create_release |
78 | | - if: success() && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
| 80 | + if: success() && github.repository_owner == 'TheConstructor' && github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
79 | 81 | uses: actions/create-release@v1 |
80 | 82 | env: |
81 | 83 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
85 | 87 | draft: true |
86 | 88 | prerelease: false |
87 | 89 | - name: Upload Release Asset |
88 | | - if: success() && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
| 90 | + if: success() && github.repository_owner == 'TheConstructor' && github.ref == 'refs/heads/main' && github.event_name == 'push' && matrix.dotnet == '3.1.x' |
89 | 91 | uses: actions/upload-release-asset@v1 |
90 | 92 | env: |
91 | 93 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
|
0 commit comments