22
33on :
44 pull_request :
5- push : {}
5+ push :
6+ branches :
67 release :
78 types : [published]
89
@@ -385,9 +386,11 @@ jobs:
385386 file_glob : true
386387
387388 - name : Restore dotnet version tool
389+ if : ${{ github.event_name == 'push' }}
388390 run : dotnet tool restore
389391
390392 - name : Generate token for GmodNET/runtime-nightly repo
393+ if : ${{ github.event_name == 'push' }}
391394 id : generate_token_for_github_nightly
392395 uses : tibdex/github-app-token@v1.3.0
393396 with :
@@ -396,26 +399,32 @@ jobs:
396399 repository : GmodNET/runtime-nightly
397400
398401 - name : Get current version
402+ if : ${{ github.event_name == 'push' }}
399403 id : get_version
400404 run : echo "::set-output name=version::$(dotnet gmodnet-vt getVersion version.json --skip-build-data)"
401405
402406 - name : Get current head
407+ if : ${{ github.event_name == 'push' }}
403408 id : get_git_head
404409 run : echo "::set-output name=head_name::'$(dotnet gmodnet-vt getBranchName version.json)'"
405410
406411 - name : Add new git remote for nightly builds
412+ if : ${{ github.event_name == 'push' }}
407413 run : |
408414 git fetch --unshallow origin
409415 git config --local --unset-all http.https://github.com/.extraheader
410416 git remote add nightly https://x-access-token:${{ steps.generate_token_for_github_nightly.outputs.token }}@github.com/GmodNET/runtime-nightly.git
411417
412418 - name : Apply git tag
419+ if : ${{ github.event_name == 'push' }}
413420 run : git tag ${{ steps.get_version.outputs.version }}
414421
415422 - name : Push tag to nightly builds repo
423+ if : ${{ github.event_name == 'push' }}
416424 run : git push nightly ${{ steps.get_version.outputs.version }} --force
417425
418426 - name : Upload build artifacts to nightly repo releases
427+ if : ${{ github.event_name == 'push' }}
419428 uses : svenstaro/upload-release-action@2.2.1
420429 with :
421430 repo_token : ${{ steps.generate_token_for_github_nightly.outputs.token }}
@@ -426,6 +435,7 @@ jobs:
426435 file_glob : true
427436
428437 - name : Send Discord message
438+ if : ${{ github.event_name == 'push' }}
429439 working-directory : csx
430440 env :
431441 DOTNET_ROLL_FORWARD : Major
0 commit comments