Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automate Release Process #45

Merged
merged 23 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
291 changes: 233 additions & 58 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .marketplace/publishManifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"overview": "overview.md",
"priceCategory": "free",
"publisher": "reqnroll",
"publisher": "Reqnroll",
"private": false,
"qna": true,
"repo": "https://github.com/reqnroll/Reqnroll.VisualStudio"
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"cSpell.words": [
"Reqnroll"
]
],
"markdown.extension.toc.updateOnSave": false
}
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

*Added support for .NET 9 through the Visual Studio extension.

*Contributors of this release (in alphabetical order):* @UL-ChrisGlew
*Contributors of this release (in alphabetical order):* @gasparnagy, @UL-ChrisGlew

# v2024.6.176 - 2024-11-08

Expand Down
50 changes: 50 additions & 0 deletions RELEASING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Releasing

This document describes how to make a release using GitHub Actions.

There are two parts to making a release:

* [Prepare the release](#prepare-the-release)
* [Make the release](#make-the-release)

If you're making a major or minor release it is recommended to discuss it with the other contributors upfront (e.g. on Discord).

## Prepare the release

Anyone with permission to push to the `main` branch can prepare a release.

1. Add new information to `CHANGELOG.md`. Ideally the `CHANGELOG.md` should be up-to-date, but sometimes there will be accidental omissions when merging PRs.
* Use `git log --format=format:"* %s (%an)" --reverse <last-version-tag>..HEAD` to list all commits since the last release.
* Add changelog details under the `# [vNext]` heading; the release process will update this heading when it makes the release
1. Check & update contributors list (if applicable)
* List recent contributors:
```
git log --format=format:"%an <%ae>" --reverse <last-version-tag>..HEAD | grep -vEi "(renovate|dependabot|Snyk)" | sort| uniq -i
```
* Update contributors if necessary at the `Contributors of this release` part of the `# [vNext]` heading
1. The Visual Studio extension releases are versioned sequentially within a year, with the format `YYYY.SEQ.BUILD` (e.g. `2024.5.182`). In the beginning of the year, the year number must be updated and the sequence number has to be reset to `1`. When preparing the release you just need to double-check if the version is correct. You can find the current version number in the `Directory.Build.props` file.

## Make the release

Only people in group [release-managers](https://github.com/orgs/reqnroll/teams/release-managers) can make releases and only from the `main` branch.

### Making a preview release

Making preview releases are currently not supported, but each build contains a deploy target with the `vsix` installation file included. Installing those could be used to test preview versions.

### Making a production release

Production releases (or just releases) are intended to use for any users. Their version number does not contain a version suffix.

To release such a preview release, the following steps has to be done:

1. Open the CI workflow at GitHub: https://github.com/reqnroll/Reqnroll.VisualStudio/actions/workflows/ci.yml
1. Choose the "Run workflow" button to trigger the release with the following settings:
* `deploy_packages`: checked
* `is_production_release`: checked
* `custom_version_suffix`: leave it empty
* `custom_configuration`: leave it on default
1. The CI workflow runs and ideally passes all core and testing jobs, but will stop for approval before running the `release` job.
1. Make sure everything is OK. You can even download the packages to be published for a smoke test if necessary.
1. If everything is fine, approve the deployment job.
1. The job will publish the packages, tag the current commit and create a new commit with the updated version number and changelog header.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>Feature.feature</DefaultName>
<Name>Feature File for Reqnroll</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>Feature.feature</DefaultName>
<Name>Feature File for Reqnroll</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>Hooks.cs</DefaultName>
<Name>Reqnroll Hooks (event bindings)</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<VSTemplate Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" Type="Item">
<TemplateData>
<DefaultName>Hooks.cs</DefaultName>
<Name>Reqnroll Hooks (event bindings)</Name>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<DefaultName>reqnroll.json</DefaultName>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Item" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005">
<TemplateData>
<DefaultName>reqnroll.json</DefaultName>
Expand Down
13 changes: 0 additions & 13 deletions Reqnroll.VisualStudio.Package/Reqnroll.VisualStudio.Package.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,6 @@

<Import Project="..\Connectors\DeploymentAssets.props" />

<Target Name="ReplaceVersions" AfterTargets="GetBuildVersion" BeforeTargets="BeforeCompile">
<ItemGroup>
<TemplateFiles Include="$(MSBuildThisFileDirectory)..\Reqnroll.VisualStudio.ItemTemplates\**\*.vstemplate" />
<TemplateFiles Include="$(MSBuildThisFileDirectory)..\Reqnroll.VisualStudio.ProjectTemplate\**\*.vstemplate" />
<VsChangeLog Include="$(MSBuildThisFileDirectory)..\CHANGELOG.md" />
</ItemGroup>

<WriteLinesToFile File="%(TemplateFiles.FullPath)" Lines="$([System.Text.RegularExpressions.Regex]::Replace($([System.IO.File]::ReadAllText(%(TemplateFiles.FullPath))), 'Version=(\d+).(\d+).(\d+).(\d+),', 'Version=$(AssemblyVersion),'))" Overwrite="true" Encoding="UTF-8" />

<WriteLinesToFile Condition=" '$(Configuration)' == 'Release' " File="%(VsChangeLog.FullPath)" Lines="$([System.IO.File]::ReadAllText(%(VsChangeLog.FullPath)).Replace('[vNext]','v$(Version) - $([System.DateTime]::Now.ToString('yyyy-MM-dd'))'))" Overwrite="true" Encoding="UTF-8" />

</Target>

<!-- needed to include version in source.extension.vsixmanifest -->
<Target Name="GetVsixVersion" Returns="$(ReqnrollPackageVersion)" BeforeTargets="BeforeCompile" AfterTargets="GetBuildVersion">
<Message Text="VSIX Version is set to: $(ReqnrollPackageVersion)" />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<VSTemplate Version="3.0.0" Type="Project" xmlns="http://schemas.microsoft.com/developer/vstemplate/2005" xmlns:sdk="http://schemas.microsoft.com/developer/vstemplate-sdkextension/2010">
<TemplateData>
<Name>Reqnroll Project</Name>
Expand Down
1 change: 1 addition & 0 deletions Reqnroll.VisualStudio.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Repo", "Repo", "{31ACD27E-7
Directory.Build.targets = Directory.Build.targets
LICENSE = LICENSE
README.md = README.md
RELEASING.md = RELEASING.md
EndProjectSection
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Reqnroll.VisualStudio.UI.Tester", "Tests\Reqnroll.VisualStudio.UI.Tester\Reqnroll.VisualStudio.UI.Tester.csproj", "{2A412F65-68C7-4A5D-AFCF-74E928C40C21}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ Scenario: Highlights Scenario Outline placeholders
Rule: Language configuration changes are applied to open feature file editors

# this scenario is flaky on CI
@quarantaine
@quarantine
Scenario: Default feature file language was changed
Given there is a non-Reqnroll project scope
And the reqnroll.json configuration file contains
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Rules:
* Highlights semantic errors

# this scenario is flaky on CI
@quarantaine
@quarantine
Scenario: Highlights syntax errors
Given there is a Reqnroll project scope
When the following feature file is opened in the editor
Expand Down
Loading