Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
112 changes: 40 additions & 72 deletions .github/workflows/on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
types: [opened, reopened, ready_for_review, synchronize]
push:
branches: [master]
tags-ignore: ["**"]
tags-ignore: ['**']

jobs:
version:
Expand All @@ -17,22 +17,19 @@ jobs:
semver: ${{ steps.format.outputs.semver }} # Without v prefix
semver_tag: ${{ steps.semver-tag.outputs.semver_tag }}
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Calculate semver tag
- name: Calculate semver tag
id: semver-tag
uses: gandarez/semver-action@master
with:
branching_model: trunk-based
major_pattern: "(?i)^(.+:)?(major/.+)"
prefix: ""
major_pattern: '(?i)^(.+:)?(major/.+)'
prefix: ''
debug: true
-
name: Remove v prefix
- name: Remove v prefix
id: format
run: |
echo "${{ steps.semver-tag.outputs.semver_tag }}"
Expand All @@ -56,38 +53,30 @@ jobs:
runs-on: windows-latest
needs: [version]
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Setup MSBuild
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
-
name: Setup NuGet
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
-
name: Restore NuGet packages
- name: Restore NuGet packages
run: nuget restore ./Dev16/Dev16.csproj -PackagesDirectory ./packages -NonInteractive
-
name: Update version
- name: Update version
run: |
(Get-Content -Path Dev16\source.extension.vsixmanifest) |
ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} |
Set-Content -Path Dev16\source.extension.vsixmanifest
(Get-Content -Path Dev16\Properties\AssemblyInfo.cs) |
ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} |
Set-Content -Path Dev16\Properties\AssemblyInfo.cs
-
name: Build Dev16 for Release
- name: Build Dev16 for Release
run: msbuild Dev16/Dev16.csproj -property:Configuration=Release -property:platform="AnyCPU" -property:DeployExtension=false
-
name: Upload artifacts
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: WakaTime.Dev16.vsix
path: Dev16/bin/Release/WakaTime.Dev16.vsix
-
name: Remove tag if failure
- name: Remove tag if failure
if: ${{ failure() }}
uses: actions/github-script@v7
with:
Expand All @@ -104,38 +93,30 @@ jobs:
runs-on: windows-latest
needs: [version]
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Setup MSBuild
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
-
name: Setup NuGet
- name: Setup NuGet
uses: NuGet/setup-nuget@v1
-
name: Restore NuGet packages
- name: Restore NuGet packages
run: nuget restore ./Dev17/Dev17.csproj -PackagesDirectory ./packages -NonInteractive
-
name: Update version
- name: Update version
run: |
(Get-Content -Path Dev17\source.extension.vsixmanifest) |
ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} |
Set-Content -Path Dev17\source.extension.vsixmanifest
(Get-Content -Path Dev17\Properties\AssemblyInfo.cs) |
ForEach-Object {$_ -Replace '1.0.0', '${{ needs.version.outputs.semver }}'} |
Set-Content -Path Dev17\Properties\AssemblyInfo.cs
-
name: Build Dev17 for Release
run: msbuild Dev17/Dev17.csproj -property:Configuration=Release -property:platform="x64" -property:DeployExtension=false
-
name: Upload artifacts
- name: Build Dev17 for Release
run: msbuild Dev17/Dev17.csproj -property:Configuration=Release -property:platform="AnyCPU" -property:DeployExtension=false
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: WakaTime.Dev17.vsix
path: Dev17/bin/x64/Release/WakaTime.Dev17.vsix
-
name: Remove tag if failure
path: Dev17/bin/AnyCPU/Release/WakaTime.Dev17.vsix
- name: Remove tag if failure
if: ${{ failure() }}
uses: actions/github-script@v7
with:
Expand All @@ -152,17 +133,14 @@ jobs:
runs-on: windows-latest
needs: [build-dev16, build-dev17] # set dependencies for all build steps to ensure all ran correctly and didn't delete the tag in case of failure
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Download artifacts
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: "*.Dev16.vsix"
pattern: '*.Dev16.vsix'
path: build/
-
name: Print VSIX identity
- name: Print VSIX identity
shell: pwsh
run: |
$vsix = Join-Path $env:GITHUB_WORKSPACE 'build\WakaTime.Dev16.vsix\WakaTime.Dev16.vsix'
Expand Down Expand Up @@ -202,8 +180,7 @@ jobs:

$internalName = $xml.PackageManifest.Metadata.InternalName
if ($internalName) { Write-Host "InternalName: $internalName" }
-
name: Print publishManifest.json identity
- name: Print publishManifest.json identity
shell: pwsh
run: |
$pm = Join-Path $env:GITHUB_WORKSPACE 'Dev16\publishManifest.json'
Expand All @@ -213,8 +190,7 @@ jobs:
if ($json.identity) {
Write-Host "Identity.InternalName: $($json.identity.internalName)"
}
-
name: Publish Dev16 to Marketplace
- name: Publish Dev16 to Marketplace
uses: cezarypiatek/VsixPublisherAction@1.1
with:
extension-file: ${{ github.workspace }}\build\WakaTime.Dev16.vsix\WakaTime.Dev16.vsix
Expand All @@ -226,17 +202,14 @@ jobs:
runs-on: windows-latest
needs: [build-dev16, build-dev17] # set dependencies for all build steps to ensure all ran correctly and didn't delete the tag in case of failure
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Download artifacts
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: "*.Dev17.vsix"
pattern: '*.Dev17.vsix'
path: build/
-
name: Print VSIX identity
- name: Print VSIX identity
shell: pwsh
run: |
$vsix = Join-Path $env:GITHUB_WORKSPACE 'build\WakaTime.Dev17.vsix\WakaTime.Dev17.vsix'
Expand Down Expand Up @@ -276,8 +249,7 @@ jobs:

$internalName = $xml.PackageManifest.Metadata.InternalName
if ($internalName) { Write-Host "InternalName: $internalName" }
-
name: Print publishManifest.json identity
- name: Print publishManifest.json identity
shell: pwsh
run: |
$pm = Join-Path $env:GITHUB_WORKSPACE 'Dev17\publishManifest.json'
Expand All @@ -287,8 +259,7 @@ jobs:
if ($json.identity) {
Write-Host "Identity.InternalName: $($json.identity.internalName)"
}
-
name: Publish Dev17 to Marketplace
- name: Publish Dev17 to Marketplace
uses: cezarypiatek/VsixPublisherAction@1.1
with:
extension-file: ${{ github.workspace }}\build\WakaTime.Dev17.vsix\WakaTime.Dev17.vsix
Expand All @@ -300,17 +271,14 @@ jobs:
runs-on: ubuntu-latest
needs: [version, publish-dev16, publish-dev17]
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
-
name: Download artifacts
- name: Download artifacts
uses: actions/download-artifact@v4
with:
pattern: "*.vsix"
pattern: '*.vsix'
path: build/
-
name: "Create release"
- name: 'Create release'
uses: softprops/action-gh-release@master
with:
name: ${{ needs.version.outputs.semver }}
Expand Down
15 changes: 15 additions & 0 deletions Dev17/Dev17.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,21 @@
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\AnyCPU\Debug\</OutputPath>
<DefineConstants>TRACE;DEBUG</DefineConstants>
<DebugType>full</DebugType>
<DeployExtension>True</DeployExtension>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'">
<PlatformTarget>AnyCPU</PlatformTarget>
<OutputPath>bin\AnyCPU\Release\</OutputPath>
<Optimize>true</Optimize>
<DefineConstants>TRACE</DefineConstants>
<DebugType>pdbonly</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|ARM64'">
<PlatformTarget>ARM64</PlatformTarget>
<OutputPath>bin\ARM64\Debug\</OutputPath>
Expand Down
8 changes: 4 additions & 4 deletions WakaTime.sln
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ Global
Release|ARM64 = Release|ARM64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.ActiveCfg = Debug|x64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.Build.0 = Debug|x64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.ActiveCfg = Debug|AnyCPU
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|Any CPU.Build.0 = Debug|AnyCPU
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|ARM64.ActiveCfg = Debug|ARM64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Debug|ARM64.Build.0 = Debug|ARM64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.ActiveCfg = Release|x64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.Build.0 = Release|x64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.ActiveCfg = Release|AnyCPU
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|Any CPU.Build.0 = Release|AnyCPU
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|ARM64.ActiveCfg = Release|ARM64
{54CE9CBA-BDCD-477B-A262-7A8A7A2A6834}.Release|ARM64.Build.0 = Release|ARM64
{E884658C-F11A-43F0-AC49-94859B3AF72F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
Expand Down
Loading