-
-
Notifications
You must be signed in to change notification settings - Fork 298
115 lines (97 loc) · 4.22 KB
/
vsix.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
111
112
113
114
115
name: VSIX
on:
workflow_dispatch:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/vsix.yml'
- '!src/GUI/**/*'
- '!src/Core/**/*'
branches:
- 'master'
pull_request:
branches:
- '*'
env:
VERSION: 2.6.${{ github.run_number }}
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.306'
- name: Update Version
run: |
((Get-Content -Path GUI/EFCorePowerTools/Properties/AssemblyInfo.cs -Raw) -Replace "2.6.0.1", "${{ env.VERSION }}") | Set-Content -Path GUI/EFCorePowerTools/Properties/AssemblyInfo.cs
((Get-Content -Path GUI/EFCorePowerTools/source.extension.vsixmanifest -Raw) -Replace "2.6.0", "${{ env.VERSION }}") | Set-Content -Path GUI/EFCorePowerTools/source.extension.vsixmanifest
((Get-Content -Path GUI/PowerToolsExtensionPack/source.extension.vsixmanifest -Raw) -Replace "2.6.0", "${{ env.VERSION }}") | Set-Content -Path GUI/PowerToolsExtensionPack/source.extension.vsixmanifest
working-directory: src
shell: pwsh
- name: Restore
run: dotnet restore EFCorePowerTools.sln
working-directory: src
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Build reveng tools
shell: cmd
run: |
cd ${{ github.workspace}}\src\Core\efreveng60
call ${{ github.workspace}}\src\Core\efreveng60\BuildCmdlineTool.cmd
cd ${{ github.workspace}}\src\Core\efreveng80
call ${{ github.workspace}}\src\Core\efreveng80\BuildCmdlineTool.cmd
cd ${{ github.workspace}}\src\Core\efreveng90
call ${{ github.workspace}}\src\Core\efreveng90\BuildCmdlineTool.cmd
cd ${{ github.workspace}}
- name: Extract and verify efreveng60.exe.zip file count
shell: cmd
run: |
mkdir vsix
7z x src/GUI/lib/efreveng60.exe.zip -oefreveng60 -y
dir /a:-d /s /b "efreveng60" | find /c ":\" > filecount.txt
findstr "158" filecount.txt
- name: Extract and verify efreveng80.exe.zip file count
shell: cmd
run: |
mkdir vsix
7z x src/GUI/lib/efreveng80.exe.zip -oefreveng80 -y
dir /a:-d /s /b "efreveng80" | find /c ":\" > filecount.txt
findstr "157" filecount.txt
- name: Extract and verify efreveng90.exe.zip file count
shell: cmd
run: |
mkdir vsix
7z x src/GUI/lib/efreveng90.exe.zip -oefreveng90 -y
dir /a:-d /s /b "efreveng90" | find /c ":\" > filecount.txt
findstr "143" filecount.txt
- name: Build
run: msbuild EFCorePowerTools.sln /property:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
working-directory: src
- name: Extract and verify vsix file count
shell: cmd
run: |
mkdir vsix
7z x src/GUI/EFCorePowerTools/bin/Release/EFCorePowerTools.vsix -ovsix -y
dir /a:-d /s /b "vsix" | find /c ":\" > filecount.txt
findstr "81" filecount.txt
- name: Move build output
if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
mv src/GUI/EFCorePowerTools/bin/Release/EFCorePowerTools.vsix EFCorePowerTools-${{ env.VERSION }}.vsix
mv src/GUI/PowerToolsExtensionPack/bin/Release/PowerToolsExtensionPack.vsix PowerToolsExtensionPack-${{ env.VERSION }}.vsix
- name: Publish artifacts
if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
*.vsix
- name: Publish to Open VSIX Gallery
if: github.ref == 'refs/heads/master' && github.repository_owner == 'erikej' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
run: |
$ErrorActionPreference='Stop'
(new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
Vsix-PublishToGallery
shell: pwsh
continue-on-error: false