Skip to content

Commit

Permalink
Build VSIX on GitHub
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikEJ committed Jan 9, 2024
1 parent 915dc84 commit 00bcb82
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/vsix.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
name: VSIX

on:
workflow_dispatch:
push:
paths-ignore:
- '**/*'
- '!.github/workflows/vsix.yml'
- '!src/GUI/**/*'
branches:
- '*'
pull_request:
branches:
- '*'

env:
VERSION: 2.6.${{ github.run_number }}

jobs:
build:

runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Update Version
run: |
((Get-Content -Path GUI/EFCorePowerTools/source.extension.vsixmanifest -Raw) -Replace "2.5.0", "${{ env.VERSION }}") | Set-Content -Path GUI/EFCorePowerTools/source.extension.vsixmanifest
working-directory: src
shell: pwsh

- name: Restore
run: dotnet restore VSIX.sln
working-directory: src

- name: Setup MSBuild.exe
uses: microsoft/[email protected]

- name: Build
run: msbuild GUI/EFCorePowerTools.sln /property:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
working-directory: src

- name: Publish artifacts
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: |
*.vsix
- name: Publish to Open VSIX Gallery
if: github.ref == 'refs/heads/master'
run: |
$ErrorActionPreference='Stop'
(new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
Vsix-PushArtifacts | Vsix-PublishToGallery
shell: pwsh
continue-on-error: false

0 comments on commit 00bcb82

Please sign in to comment.