Skip to content

Base build

Base build #6

Workflow file for this run

name: "Base build"
on:
workflow_call:
outputs:
version:
description: 'Version of the build'
value: ${{ jobs.build.outputs.version }}
workflow_dispatch:
inputs:
Reason:
description: 'Reason for the build'
jobs:
build:
outputs:
version: ${{ steps.vsix_version.outputs.SimpleVersion }}
name: Build
runs-on: windows-2022
env:
PROJECT_PATH: "src/GitHubActionsVS.sln"
VsixManifestPath: src\source.extension.vsixmanifest
VsixManifestSourcePath: src\source.extension.cs
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Version stamping
id: vsix_version
uses: dotnet/[email protected]
with:
setAllVars: true
- name: 🧰 Setup .NET build dependencies
uses: timheuer/bootstrap-dotnet@v1
with:
nuget: 'false'
sdk: 'false'
msbuild: 'true'
- name: Increment VSIX version
id: vsix_version_stamp
uses: timheuer/vsix-version-stamp@v2
with:
manifest-file: ${{ env.VsixManifestPath }}
vsix-token-source-file: ${{ env.VsixManifestSourcePath }}
version-number: ${{ steps.vsix_version.outputs.SimpleVersion }}
- name: 🏗️ Build
run: msbuild ${{ env.PROJECT_PATH }} /p:Configuration=Release /v:m -restore /p:OutDir=\_built -bl
- name: ⬆️ Upload artifact
uses: actions/upload-artifact@v4
with:
name: msbuild.binlog
path: msbuild.binlog
- name: ⬆️ Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}.vsix
path: /_built/**/*.vsix
- name: Echo version
run: |
Write-Output ${{ steps.vsix_version.outputs.SimpleVersion }}