Added sponsor badge #174
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
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json | |
name: "Build" | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
branches: [master] | |
workflow_dispatch: | |
branches: [master] | |
jobs: | |
build: | |
outputs: | |
version: ${{ steps.vsix_version.outputs.version-number }} | |
name: Build | |
runs-on: windows-2022 | |
env: | |
Configuration: Release | |
DeployExtension: False | |
VsixManifestPath: src\source.extension.vsixmanifest | |
VsixManifestSourcePath: src\source.extension.cs | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET build dependencies | |
uses: timheuer/bootstrap-dotnet@v2 | |
with: | |
nuget: 'false' | |
sdk: 'false' | |
msbuild: 'true' | |
- name: Increment VSIX version | |
id: vsix_version | |
uses: timheuer/vsix-version-stamp@v2 | |
with: | |
manifest-file: ${{ env.VsixManifestPath }} | |
vsix-token-source-file: ${{ env.VsixManifestSourcePath }} | |
#- name: Prepare Visual Studio | |
# run: '&"C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\devenv.exe" /RootSuffix Exp /ResetSettings General.vssettings /Command File.Exit' | |
- name: Build | |
run: msbuild /v:m -restore /p:OutDir=\_built | |
#- name: test | |
# run: dotnet test --no-build -c ${{ env.Configuration }} /p:OutDir=../_built /bl:"bin/build_logs/test.binlog" --filter "TestCategory!=FailsInCloudTest" -v n /p:CollectCoverage=true /m:1 --logger trx --settings "${{ github.workspace }}/.github/workflows/${{ runner.os }}.runsettings" | |
#- name: Setup test | |
# uses: darenm/[email protected] | |
#- name: Test | |
# run: vstest.console.exe \_built\*Tests.dll | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}.vsix | |
path: /_built/**/*.vsix | |
publish: | |
if: ${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' }} | |
needs: build | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download Package artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: ${{ github.event.repository.name }}.vsix | |
- name: Upload to Open VSIX | |
uses: timheuer/openvsixpublish@v1 | |
with: | |
vsix-file: ${{ github.event.repository.name }}.vsix | |
- name: Tag and Release | |
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[release]') }} | |
id: tag_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body: Release ${{ needs.build.outputs.version }} | |
tag_name: ${{ needs.build.outputs.version }} | |
files: | | |
**/*.vsix | |
- name: Publish extension to Marketplace | |
if: ${{ github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, '[release]') }} | |
uses: cezarypiatek/[email protected] | |
with: | |
extension-file: '${{ github.event.repository.name }}.vsix' | |
publish-manifest-file: 'vs-publish.json' | |
personal-access-code: ${{ secrets.VS_PUBLISHER_ACCESS_TOKEN }} |