Base build #5
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: "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/nbgv@e6830c173ef6061fe122d7205ac31bb2f8cca842 | |
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 }} |