|
1 | | -name: "Build and Deploy" |
2 | | - |
| 1 | +name: 'Build and Deploy' |
| 2 | + |
3 | 3 | on: |
4 | 4 | workflow_dispatch: |
| 5 | + pull_request: |
| 6 | + types: [opened, reopened] |
5 | 7 | push: |
6 | | - branches: |
| 8 | + branches: |
7 | 9 | - main |
8 | 10 | tags-ignore: |
9 | | - - "release/**" |
10 | | - |
| 11 | + - 'v[0-9]+.[0-9]+.[0-9]+.[0-9]+' |
| 12 | + |
11 | 13 | jobs: |
12 | | - Release-Build-and-Deploy: |
| 14 | + Release-Build-and-Deploy: |
13 | 15 | runs-on: windows-latest |
14 | | - |
| 16 | + |
15 | 17 | steps: |
16 | | - - uses: actions/checkout@v3 |
17 | | - - uses: microsoft/[email protected] |
18 | | - |
19 | | - - name: 1. Versioning Release |
20 | | - uses: CalvinAllen/action-vs-vsix-versioner@v1 |
21 | | - with: |
22 | | - extension-manifest-file: "./src/CodingWithCalvin.BreakpointNotifier.Vsix/source.extension.vsixmanifest" |
23 | | - extension-source-file: "./src/CodingWithCalvin.BreakpointNotifier.Vsix/source.extension.cs" |
24 | | - |
25 | | - - name: 2. Bootstrapping NuGet Installer |
26 | | - |
27 | | - |
28 | | - - name: 3. Restoring Packages |
29 | | - run: nuget restore ./src/CodingWithCalvin.BreakpointNotifier.sln |
30 | | - |
31 | | - - name: 4. Building Project |
32 | | - run: msbuild './src/CodingWithCalvin.BreakpointNotifier.Vsix/CodingWithCalvin.BreakpointNotifier.Vsix.csproj' /p:configuration='Release' /p:platform='x64' |
33 | | - |
34 | | - - name: 5. Publishing Build Artifact |
35 | | - uses: actions/upload-artifact@v3 |
36 | | - with: |
37 | | - path: "./src/CodingWithCalvin.BreakpointNotifier.Vsix/bin/x64/Release/CodingWithCalvin.BreakpointNotifier.Vsix.vsix" |
| 18 | + - uses: actions/checkout@v4 |
| 19 | + - uses: microsoft/setup-msbuild@v2 |
| 20 | + - uses: nuget/setup-nuget@v2 |
| 21 | + |
| 22 | + - name: 1. Versioning Release |
| 23 | + id: step-version |
| 24 | + uses: CodingWithCalvin/GHA-VSVsixVersioner@v1 |
| 25 | + with: |
| 26 | + extension-manifest-file: 'src/CodingWithCalvin.BreakpointNotifier/source.extension.vsixmanifest' |
| 27 | + extension-source-file: 'src/CodingWithCalvin.BreakpointNotifier/source.extension.cs' |
| 28 | + |
| 29 | + - name: 2. Restoring Packages |
| 30 | + run: nuget restore src/CodingWithCalvin.BreakpointNotifier.sln |
| 31 | + |
| 32 | + - name: 3. Building Project |
| 33 | + run: msbuild 'src/CodingWithCalvin.BreakpointNotifier/CodingWithCalvin.BreakpointNotifier.csproj' /p:configuration='Release' /p:platform='x64' /p:DeployExtension=False |
| 34 | + |
| 35 | + - name: 4. Create Information File |
| 36 | + |
| 37 | + with: |
| 38 | + name: 'src/CodingWithCalvin.BreakpointNotifier/bin/x64/Release/CodingWithCalvin.BreakpointNotifier.info' |
| 39 | + json: '{"sha":"${{ github.sha }}", "version":"${{ steps.step-version.outputs.version }}"}' |
| 40 | + |
| 41 | + - name: 5. Publishing Build Artifact |
| 42 | + uses: actions/upload-artifact@v4 |
| 43 | + with: |
| 44 | + path: | |
| 45 | + src/CodingWithCalvin.BreakpointNotifier/bin/x64/Release/CodingWithCalvin.BreakpointNotifier.info |
| 46 | + src/CodingWithCalvin.BreakpointNotifier/bin/x64/Release/CodingWithCalvin.BreakpointNotifier.vsix |
0 commit comments