Skip to content

Commit 2630048

Browse files
author
Samir Boulema
committed
ci: Use Github actions
1 parent 68f1d2f commit 2630048

File tree

3 files changed

+92
-3
lines changed

3 files changed

+92
-3
lines changed

.github/workflows/workflow.yml

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
name: TGit
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'feature/**'
8+
9+
env:
10+
version: '5.1.${{ github.run_number }}'
11+
repoUrl: ${{ github.server_url }}/${{ github.repository }}
12+
13+
jobs:
14+
build:
15+
name: Build
16+
runs-on: windows-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
21+
- name: Update Assembly Version
22+
uses: dannevesdantas/[email protected]
23+
with:
24+
version: ${{ env.version }}
25+
26+
- name: Update Vsix Version
27+
uses: cezarypiatek/[email protected]
28+
with:
29+
version: ${{ env.version }}
30+
vsix-manifest-file: 'TGit\source.extension.vsixmanifest'
31+
32+
- name: Setup MSBuild
33+
uses: microsoft/[email protected]
34+
35+
- name: NuGet restore
36+
run: nuget restore TGit.sln -ConfigFile nuget.config
37+
38+
- name: Build VSIX
39+
run: msbuild TGit.sln /t:Rebuild /p:Configuration=Release
40+
env:
41+
DeployExtension: False
42+
43+
- name: Publish Build Artifacts
44+
uses: actions/upload-artifact@v2
45+
with:
46+
name: TGit
47+
path: |
48+
**\*.vsix
49+
publish-manifest.*.json
50+
readme.md
51+
52+
release:
53+
name: Release
54+
needs: build
55+
runs-on: windows-latest
56+
environment: Release
57+
steps:
58+
- name: Download artifact
59+
uses: actions/download-artifact@v2
60+
61+
- name: Tag release
62+
id: tag_release
63+
uses: mathieudutour/[email protected]
64+
with:
65+
custom_tag: '${{ env.version }}'
66+
github_token: ${{ secrets.GITHUB_TOKEN }}
67+
68+
- name: Create a GitHub release
69+
uses: ncipollo/release-action@v1
70+
with:
71+
tag: ${{ steps.tag_release.outputs.new_tag }}
72+
name: ${{ steps.tag_release.outputs.new_tag }}
73+
body: ${{ steps.tag_release.outputs.changelog }}
74+
artifacts: "**/*.vsix"
75+
76+
- name: Publish to Marketplace
77+
uses: cezarypiatek/[email protected]
78+
with:
79+
extension-file: TGit/bin/release/TGit.vsix
80+
publish-manifest-file: TSVN/publish-manifest.VS2022.json
81+
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }}
82+
83+
- name: Publish to Open VSIX Gallery
84+
uses: leandro-hermes/[email protected]
85+
with:
86+
host: 'www.vsixgallery.com'
87+
path: '/api/upload?repo=${{ env.repoUrl }}&issuetracker=${{ env.repoUrl }}/issues'
88+
https: true
89+
filePath: TGit/bin/release/TGit.vsix

TGIT.sln

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{6D6C80BD-B63E-4F6D-A9D3-89AE15DA2D7C}"
77
ProjectSection(SolutionItems) = preProject
88
.editorconfig = .editorconfig
9-
azure-pipelines.yml = azure-pipelines.yml
109
publish-manifest.json = publish-manifest.json
1110
README.md = README.md
11+
.github\workflows\workflow.yml = .github\workflows\workflow.yml
1212
EndProjectSection
1313
EndProject
1414
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "TGit", "TGit\TGit.csproj", "{22376990-61FD-4AF5-856C-004CEA4E77EC}"

TGit/TGIT.csproj

+2-2
Original file line numberDiff line numberDiff line change
@@ -351,15 +351,15 @@
351351
</ItemGroup>
352352
<ItemGroup>
353353
<PackageReference Include="Community.VisualStudio.Toolkit">
354-
<Version>15.0.76.253-pre</Version>
354+
<Version>15.0.76.304</Version>
355355
</PackageReference>
356356
<PackageReference Include="Community.VisualStudio.VSCT">
357357
<Version>16.0.29.6</Version>
358358
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
359359
<PrivateAssets>all</PrivateAssets>
360360
</PackageReference>
361361
<PackageReference Include="Microsoft.VSSDK.BuildTools">
362-
<Version>17.0.2155-preview2</Version>
362+
<Version>17.0.4207-preview4</Version>
363363
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
364364
<PrivateAssets>all</PrivateAssets>
365365
</PackageReference>

0 commit comments

Comments
 (0)