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