Skip to content

Initial version

Initial version #1

Workflow file for this run

name: build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: nuget/setup-nuget@v2
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Update version
run: |
(Get-Content -Path src\LoggerVisualizerVsix\source.extension.vsixmanifest) |
ForEach-Object {$_ -Replace '0.1.0', '0.1.${{ github.run_number }}'} |
Set-Content -Path src\LoggerVisualizerVsix\source.extension.vsixmanifest
- name: Restore
run: nuget restore
- name: Build
run: msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
- uses: actions/upload-artifact@v3
with:
name: LoggerVisualizer.vsix
path: src\LoggerVisualizerVsix\bin\Release\net8.0-windows\LoggerVisualizerVsix.vsix
- name: Create Release
id: create_release
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
with:
tag_name: 0.1.${{ github.run_number }}
release_name: Release 0.1.${{ github.run_number }}
draft: false
- name: Upload VSIX
if: ${{ github.event_name == 'push' }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: src\LoggerVisualizerVsix\bin\Release\net8.0-windows\LoggerVisualizerVsix.vsix
asset_name: LoggerVisualizerVsix.vsix
asset_content_type: application/zip