Base build #3
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" | |
steps: | |
- uses: actions/checkout@v3 | |
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: 🏗️ Build | |
run: msbuild ${{ env.PROJECT_PATH }} /p:Configuration=Release /v:m -restore /p:OutDir=\_built -bl | |
- name: ⬆️ Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: msbuild.binlog | |
path: msbuild.binlog | |
- name: ⬆️ Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ github.event.repository.name }}.vsix | |
path: /_built/**/*.vsix | |
- name: Echo version | |
run: | | |
Write-Output ${{ steps.vsix_version.outputs.SimpleVersion }} |