6767
6868 - name : Create release
6969 id : create-release
70- if : github.event_name == 'pull_request'
7170 uses : actions/create-release@v1.0.0
7271 env :
7372 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8281
8382 - name : Upload release asset
8483 uses : actions/upload-release-asset@v1.0.1
85- if : success() && github.event_name == 'pull_request'
84+ if : success()
8685 env :
8786 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8887 with :
@@ -93,27 +92,20 @@ jobs:
9392 asset_name : ${{ format('vscode-codeql-{0}.vsix', steps.prepare-artifacts.outputs.ref_name) }}
9493 asset_content_type : application/zip
9594
96-
97- - name : No Release
98- if : github.event_name != 'pull_request'
99- run : |
100- echo "Not making a release because this is not a pull request"
101-
10295 # ##
10396 # Do Post release work: version bump and changelog PR
10497 # Only do this if we are running from a PR (ie- this is part of the release process)
10598
10699 # The checkout action does not fetch the main branch.
107100 # Fetch the main branch so that we can base the version bump PR against main.
108101 - name : Fetch main branch
109- if : github.event_name == 'pull_request'
110102 run : |
111103 git fetch --depth=1 origin main:main
112104 git checkout main
113105
114106 - name : Bump patch version
115107 id : bump-patch-version
116- if : success() && github.event_name == 'pull_request'
108+ if : success()
117109 run : |
118110 cd extensions/ql-vscode
119111 # Bump to the next patch version. Major or minor version bumps will have to be done manually.
@@ -122,14 +114,14 @@ jobs:
122114 echo "::set-output name=next_version::$NEXT_VERSION"
123115
124116 - name : Add changelog for next release
125- if : success() && github.event_name == 'pull_request'
117+ if : success()
126118 run : |
127119 cd extensions/ql-vscode
128120 perl -i -pe 's/^/## \[UNRELEASED\]\n\n/ if($.==3)' CHANGELOG.md
129121
130122 - name : Create version bump PR
131123 uses : peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb # v3.4.1
132- if : success() && github.event_name == 'pull_request'
124+ if : success()
133125 with :
134126 token : ${{ secrets.GITHUB_TOKEN }}
135127 commit-message : Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
0 commit comments