-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
splitting steps, fixing manifest update
- Loading branch information
Showing
1 changed file
with
40 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,14 +11,9 @@ on: | |
|
||
jobs: | ||
build-and-test: | ||
runs-on: windows-latest | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup MSBuild for NetFX | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
vs-version: 17.0 | ||
|
||
- name: Setup .NET | ||
uses: actions/setup-dotnet@v4 | ||
with: | ||
|
@@ -29,22 +24,37 @@ jobs: | |
with: | ||
show-progress: false | ||
|
||
- name: Restore NuGet packages | ||
run: nuget restore .\DocGpt.sln | ||
|
||
- name: Run unit tests | ||
run: dotnet test .\DocGpt.Test\DocGpt.Test.csproj --configuration Release | ||
|
||
run: dotnet test ./DocGpt.Test/DocGpt.Test.csproj --configuration Release | ||
|
||
package-extension: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Setup MSBuild for NetFX | ||
uses: microsoft/setup-msbuild@v2 | ||
with: | ||
vs-version: 17.0 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
with: | ||
show-progress: false | ||
|
||
- name: Bump version | ||
run: | | ||
# Set version number as '1.0.<gh workflow run number>' | ||
$NEW_VERSION = "1.0.$env:GITHUB_RUN_NUMBER" | ||
# Use PowerShell to update the version in the VSIX manifest | ||
$xml = xml | ||
$xml.SelectSingleNode('//Version').InnerText = $NEW_VERSION | ||
$xml.OuterXml | Set-Content -Path .\DocGpt.Vsix\source.extension.vsixmanifest | ||
$xml = [xml](Get-Content -Path .\DocGpt.Vsix\source.extension.vsixmanifest) | ||
$identityNode = $xml.PackageManifest.Metadata.Identity | ||
$identityNode.SetAttribute('Version', $NEW_VERSION) | ||
$xml.Save(".\DocGpt.Vsix\source.extension.vsixmanifest") | ||
- name: Restore NuGet packages | ||
run: nuget restore .\DocGpt.sln | ||
|
||
- name: Build Extension | ||
run: msbuild .\DocGpt.sln -p:Configuration=Release | ||
|
||
|
@@ -57,9 +67,19 @@ jobs: | |
name: DocGpt.vsix | ||
path: DocGpt.Vsix\bin\Release\DocGPT.vsix | ||
|
||
# - name: Publish to marketplace | ||
# uses: cezarypiatek/[email protected] | ||
# with: | ||
# extension-file: .\DocGpt.Vsix\bin\Release\DocGPT.vsix | ||
# personal-access-code: ${{ secrets.VS_MARKETPLACE_TOKEN }} | ||
# publish-manifest-file: .\DocGpt.Vsix\publishmanifest.json | ||
# publish-to-marketplace: | ||
# needs: package-extension | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - name: Download artifact | ||
# uses: actions/download-artifact@v2 | ||
# with: | ||
# name: DocGPT.vsix | ||
# path: ./DocGPT.vsix | ||
# - name: Publish to marketplace | ||
# uses: cezarypiatek/[email protected] | ||
# with: | ||
# extension-file: ./DocGPT.vsix | ||
# personal-access-code: ${{ secrets.VS_MARKETPLACE_TOKEN }} | ||
# publish-manifest-file: ./DocGpt.Vsix/publishmanifest.json |