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
+
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
0 commit comments