67
67
68
68
- name : Create release
69
69
id : create-release
70
- if : github.event_name == 'pull_request'
71
70
72
71
env :
73
72
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
82
81
83
82
- name : Upload release asset
84
83
85
- if : success() && github.event_name == 'pull_request'
84
+ if : success()
86
85
env :
87
86
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
88
87
with :
@@ -93,27 +92,20 @@ jobs:
93
92
asset_name : ${{ format('vscode-codeql-{0}.vsix', steps.prepare-artifacts.outputs.ref_name) }}
94
93
asset_content_type : application/zip
95
94
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
-
102
95
# ##
103
96
# Do Post release work: version bump and changelog PR
104
97
# Only do this if we are running from a PR (ie- this is part of the release process)
105
98
106
99
# The checkout action does not fetch the main branch.
107
100
# Fetch the main branch so that we can base the version bump PR against main.
108
101
- name : Fetch main branch
109
- if : github.event_name == 'pull_request'
110
102
run : |
111
103
git fetch --depth=1 origin main:main
112
104
git checkout main
113
105
114
106
- name : Bump patch version
115
107
id : bump-patch-version
116
- if : success() && github.event_name == 'pull_request'
108
+ if : success()
117
109
run : |
118
110
cd extensions/ql-vscode
119
111
# Bump to the next patch version. Major or minor version bumps will have to be done manually.
@@ -122,14 +114,14 @@ jobs:
122
114
echo "::set-output name=next_version::$NEXT_VERSION"
123
115
124
116
- name : Add changelog for next release
125
- if : success() && github.event_name == 'pull_request'
117
+ if : success()
126
118
run : |
127
119
cd extensions/ql-vscode
128
120
perl -i -pe 's/^/## \[UNRELEASED\]\n\n/ if($.==3)' CHANGELOG.md
129
121
130
122
- name : Create version bump PR
131
123
uses : peter-evans/create-pull-request@c7f493a8000b8aeb17a1332e326ba76b57cb83eb # v3.4.1
132
- if : success() && github.event_name == 'pull_request'
124
+ if : success()
133
125
with :
134
126
token : ${{ secrets.GITHUB_TOKEN }}
135
127
commit-message : Bump version to ${{ steps.bump-patch-version.outputs.next_version }}
0 commit comments