Skip to content

Commit 31b445c

Browse files
committed
Remove logic to only create release artifacts on PRs
Create them for appropriately named tags and workflow dispatch as well.
1 parent 7387ef6 commit 31b445c

File tree

2 files changed

+5
-12
lines changed

2 files changed

+5
-12
lines changed

.github/workflows/release.yml

+4-12
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ jobs:
6767

6868
- name: Create release
6969
id: create-release
70-
if: github.event_name == 'pull_request'
7170
uses: actions/[email protected]
7271
env:
7372
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -82,7 +81,7 @@ jobs:
8281

8382
- name: Upload release asset
8483
uses: actions/[email protected]
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 }}

extensions/ql-vscode/src/upgrades.ts

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { upgradesTmpDir } from './run-queries';
88
import * as tmp from 'tmp-promise';
99
import * as path from 'path';
1010
import * as semver from 'semver';
11+
import { DatabaseItem } from './databases';
1112

1213
/**
1314
* Maximum number of lines to include from database upgrade message,

0 commit comments

Comments
 (0)