Skip to content

Commit 1ca9614

Browse files
[automated] Merge branch 'main' => 'prerelease' (#8571)
2 parents c8a1e04 + b9ec0f3 commit 1ca9614

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1038
-2839
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: branch_classification
2+
description: Branch classification configuration for repository
3+
resource: repository
4+
disabled: false
5+
where:
6+
configuration:
7+
branchClassificationSettings:
8+
defaultClassification: nonproduction
9+
ruleset:
10+
- name: prod-branches
11+
branchNames:
12+
- main
13+
- prerelease
14+
- release
15+
classification: production
16+
- name: nonprod-branches
17+
branchNames:
18+
- feature
19+
classification: nonproduction

.github/workflows/create-release.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Create GitHub Release
2+
on:
3+
push:
4+
tags:
5+
- 'v2.*'
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
# This job runs against the yaml defined in the tag we were triggered on.
12+
# So we can modify the release creation without having to wait for the change to flow into the commit
13+
# that we're tagging, we call a reusable workflow from main
14+
create-release:
15+
uses: dotnet/vscode-csharp/.github/workflows/release-reusable.yml@main
16+
with:
17+
tag: ${{ github.ref_name }}
18+
secrets: inherit
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Reusable - Create Release from Changelog
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
tag:
7+
description: Tag name to create a release for (e.g. v2.88.0 or v2.88.0-prerelease)
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
create-release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout tag
19+
uses: actions/checkout@v4
20+
with:
21+
ref: refs/tags/${{ inputs.tag }}
22+
23+
- name: Create release from CHANGELOG
24+
uses: actions/github-script@v7
25+
env:
26+
TAG: ${{ inputs.tag }}
27+
with:
28+
github-token: ${{ secrets.GITHUB_TOKEN }}
29+
script: |
30+
const { readFile } = require('fs/promises');
31+
32+
const tag = process.env.TAG;
33+
core.info(`Creating release for tag: ${tag}`);
34+
35+
if (!tag || !tag.startsWith('v2.')) {
36+
core.setFailed('Invalid tag name. Tag name must start with "v2."');
37+
return;
38+
}
39+
40+
// Read CHANGELOG.md and extract the latest section (first single '#' header)
41+
const changelog = await readFile('CHANGELOG.md', 'utf8');
42+
const headerMatch = changelog.match(/^# .+$/m);
43+
if (!headerMatch) {
44+
core.setFailed('Could not find a top-level # header in CHANGELOG.md');
45+
return;
46+
}
47+
const startIdx = changelog.indexOf(headerMatch[0]);
48+
let endIdx = changelog.indexOf('\n# ', startIdx + headerMatch[0].length);
49+
if (endIdx === -1) {
50+
endIdx = changelog.length;
51+
}
52+
const releaseNotes = changelog.substring(startIdx, endIdx).trim();
53+
54+
const isPrerelease = tag.includes('-prerelease');
55+
core.info(`Prerelease: ${isPrerelease}`);
56+
57+
try {
58+
const response = await github.rest.repos.createRelease({
59+
owner: context.repo.owner,
60+
repo: context.repo.repo,
61+
tag_name: tag,
62+
name: tag,
63+
body: releaseNotes,
64+
prerelease: isPrerelease,
65+
});
66+
core.info(`Release created: ${response.data.html_url}`);
67+
} catch (err) {
68+
if (err && err.status === 422 && err.message && String(err.message).includes('already_exists')) {
69+
core.warning(`Release for tag '${tag}' already exists.`);
70+
} else {
71+
core.setFailed(`Error creating release: ${err?.message ?? err}`);
72+
}
73+
}

.mocharc.jsonc

Lines changed: 0 additions & 6 deletions
This file was deleted.
File renamed without changes.

CHANGELOG.md

Lines changed: 164 additions & 149 deletions
Large diffs are not rendered by default.

azure-pipelines-official.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ extends:
6060
customBuildTags:
6161
- ES365AIMigrationTooling
6262
stages:
63-
- template: /azure-pipelines/build-all.yml@self
63+
- template: /azure-pipelines/build-vsix.yml@self
6464
parameters:
6565
versionNumberOverride: ${{ parameters.versionNumberOverride }}
6666
isOfficial: true

azure-pipelines.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pr:
2121
- .github/*
2222
- azure-pipelines/release.yml
2323
- CHANGELOG.
24+
- 'l10n/bundle.l10n.*.json'
2425

2526
# Run a scheduled build every night on main to run tests against insiders VSCode.
2627
# The variable testVSCodeVersion is set to insiders based on the build reason.
@@ -40,12 +41,16 @@ variables:
4041
value: stable
4142

4243
stages:
43-
- template: azure-pipelines/build-all.yml
44+
- template: azure-pipelines/build-vsix.yml
4445
parameters:
4546
isOfficial: false
4647
signType: test
4748
dotnetVersion: $(defaultDotnetVersion)
4849

50+
- template: azure-pipelines/validate-build.yml
51+
parameters:
52+
dotnetVersion: $(defaultDotnetVersion)
53+
4954
- stage:
5055
displayName: Test Linux (.NET 8)
5156
dependsOn: []

azure-pipelines/build-all.yml

Lines changed: 0 additions & 136 deletions
This file was deleted.

0 commit comments

Comments
 (0)