Skip to content

Commit 0774fc4

Browse files
authored
First deploy to NuGet (#15)
* Added NuGet publish * Updated to only deploy when release is merged
1 parent 6910fc7 commit 0774fc4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,15 @@ jobs:
7676
echo "RELNOTES=$relnotes" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append
7777
7878
- name: Push to NuGet
79-
if: ${{ github.ref == 'refs/heads/release' }}
79+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.ref == 'refs/heads/release'
8080
run: dotnet nuget push **/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
8181

8282
- name: Tag and Release
83-
if: ${{ github.ref == 'refs/heads/release' && github.event_name != 'pull_request' }}
83+
if: github.event_name == 'pull_request' && github.event.action == 'closed' && github.event.pull_request.merged == true && github.ref == 'refs/heads/release'
8484
id: tag_release
8585
uses: softprops/action-gh-release@v0.1.13
8686
with:
8787
body: ${{ env.RELNOTES }}
8888
tag_name: ${{ env.PKG_VERSION }}
8989
files: |
90-
**/*.nupkg
90+
**/*.nupkg

0 commit comments

Comments
 (0)