Skip to content

Commit 8c9618a

Browse files
committed
Trying better versioning for prod registration
1 parent 264e710 commit 8c9618a

6 files changed

+30
-9
lines changed

Diff for: .github/workflows/_build.yaml

+13-3
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ jobs:
1919
runs-on: windows-2022
2020
env:
2121
PROJECT_PATH: "src/GitHubActionsVS.sln"
22+
VsixManifestPath: src\source.extension.vsixmanifest
23+
VsixManifestSourcePath: src\source.extension.cs
2224

2325
steps:
24-
- uses: actions/checkout@v3
26+
- uses: actions/checkout@v4
2527
with:
2628
fetch-depth: 0
2729

@@ -38,17 +40,25 @@ jobs:
3840
sdk: 'false'
3941
msbuild: 'true'
4042

43+
- name: Increment VSIX version
44+
id: vsix_version
45+
uses: timheuer/vsix-version-stamp@v2
46+
with:
47+
manifest-file: ${{ env.VsixManifestPath }}
48+
vsix-token-source-file: ${{ env.VsixManifestSourcePath }}
49+
version-number: ${{ steps.vsix_version.outputs.SimpleVersion }}
50+
4151
- name: 🏗️ Build
4252
run: msbuild ${{ env.PROJECT_PATH }} /p:Configuration=Release /v:m -restore /p:OutDir=\_built -bl
4353

4454
- name: ⬆️ Upload artifact
45-
uses: actions/upload-artifact@v3
55+
uses: actions/upload-artifact@v4
4656
with:
4757
name: msbuild.binlog
4858
path: msbuild.binlog
4959

5060
- name: ⬆️ Upload artifact
51-
uses: actions/upload-artifact@v3
61+
uses: actions/upload-artifact@v4
5262
with:
5363
name: ${{ github.event.repository.name }}.vsix
5464
path: /_built/**/*.vsix

Diff for: .github/workflows/publish.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121
VERSION: ${{ needs.build.outputs.version }}
2222

2323
steps:
24-
- uses: actions/checkout@v3
24+
- uses: actions/checkout@v4
2525
with:
2626
fetch-depth: 0
2727

2828
- name: Download Package artifact
29-
uses: actions/download-artifact@v3
29+
uses: actions/download-artifact@v4
3030
with:
3131
name: ${{ github.event.repository.name }}.vsix
3232

Diff for: src/GitHubActionsVS.csproj

+6-1
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@
6767
<DesignTime>True</DesignTime>
6868
<DependentUpon>UIStrings.resx</DependentUpon>
6969
</Compile>
70-
<Compile Include="source.vsixinfo.cs" />
70+
<Compile Include="source.extension.cs">
71+
<AutoGen>True</AutoGen>
72+
<DesignTime>True</DesignTime>
73+
<DependentUpon>source.extension.vsixmanifest</DependentUpon>
74+
</Compile>
7175
<Compile Include="ToolWindows\GHActionsToolWindow.xaml.cs">
7276
<DependentUpon>GHActionsToolWindow.xaml</DependentUpon>
7377
</Compile>
@@ -98,6 +102,7 @@
98102
<None Include="source.extension.vsixmanifest">
99103
<SubType>Designer</SubType>
100104
<Generator>VsixManifestGenerator</Generator>
105+
<LastGenOutput>source.extension.cs</LastGenOutput>
101106
</None>
102107
<Content Include="lib\win32\x64\git2-e632535.dll">
103108
<IncludeInVSIX>true</IncludeInVSIX>

Diff for: src/GitHubActionsVSPackage.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
namespace GitHubActionsVS;
1212
[PackageRegistration(UseManagedResourcesOnly = true, AllowsBackgroundLoading = true)]
13-
[InstalledProductRegistration(Vsix.Name, Vsix.Description, Vsix.Id)]
13+
[InstalledProductRegistration(Vsix.Name, Vsix.Description, Vsix.Version)]
1414
[ProvideToolWindow(typeof(ActionsToolWindow.Pane), Style = VsDockStyle.Tabbed, Window = WindowGuids.SolutionExplorer)]
1515
[ProvideOptionPage(typeof(OptionsProvider.ExtensionOptionsOptions), "GitHub", "Actions", 0, 0, true, SupportsProfiles = true)]
1616
[ProvideMenuResource("Menus.ctmenu", 1)]

Diff for: src/source.vsixinfo.cs renamed to src/source.extension.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1-
namespace GitHubActionsVS
1+
// ------------------------------------------------------------------------------
2+
// <auto-generated>
3+
// This file was generated by VSIX Synchronizer
4+
// </auto-generated>
5+
// ------------------------------------------------------------------------------
6+
namespace GitHubActionsVS
27
{
38
internal sealed partial class Vsix
49
{
510
public const string Id = "TimHeuer.GitHubActions";
611
public const string Name = "GitHub Actions";
712
public const string Description = @"A window that provides a view of GitHub Actions for the current repo of the opened solution in Visual Studio";
813
public const string Language = "en-US";
14+
public const string Version = "0.0.999";
915
public const string Author = "Tim Heuer";
1016
public const string Tags = "github,actions,workflow,devops,dotnet";
1117
}

Diff for: src/source.extension.vsixmanifest

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<PackageManifest Version="2.0.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
33
<Metadata>
4-
<Identity Id="TimHeuer.GitHubActions" Version="|%CurrentProject%;GetBuildVersion|" Language="en-US" Publisher="Tim Heuer" />
4+
<Identity Id="TimHeuer.GitHubActions" Version="0.0.999" Language="en-US" Publisher="Tim Heuer" />
55
<DisplayName>GitHub Actions</DisplayName>
66
<Description xml:space="preserve">A window that provides a view of GitHub Actions for the current repo of the opened solution in Visual Studio</Description>
77
<MoreInfo>https://github.com/timheuer/GitHubActionsVS</MoreInfo>

0 commit comments

Comments
 (0)