Tried to move custom nuget feed to nuget.config #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: nuget/setup-nuget@v1 | |
- name: Add msbuild to PATH | |
uses: microsoft/[email protected] | |
- name: Update version | |
run: | | |
(Get-Content -Path src\ExceptionVisualizerVsix\source.extension.vsixmanifest) | | |
ForEach-Object {$_ -Replace '0.1.0', '0.1.${{ github.run_number }}'} | | |
Set-Content -Path src\ExceptionVisualizerVsix\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: ExceptionVisualizer.vsix | |
path: src\ExceptionVisualizerVsix\bin\Release\net6.0-windows\ExceptionVisualizerVsix.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\ExceptionVisualizerVsix\bin\Release\net6.0-windows\ExceptionVisualizerVsix.vsix | |
asset_name: ExceptionVisualizerVsix.vsix | |
asset_content_type: application/zip |