Update build.yml #4
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: Build Phase | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install GitVersion | |
uses: gittools/actions/gitversion/setup@v1.1.1 | |
with: | |
versionSpec: '5.x' | |
- name: Determine Version | |
uses: gittools/actions/gitversion/execute@v1.1.1 | |
id: gitversion_step | |
with: | |
useConfigFile: true | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.0.x | |
- name: Restore dependencies | |
run: dotnet restore | |
- name: Update csproj version | |
shell: pwsh | |
working-directory: SnowflakePS | |
env: | |
gitVersion_assemblyVersion: ${{ steps.gitversion_step.outputs.AssemblySemVer }} | |
run: ../Scripts/SetProjectVersion.ps1 | |
- name: Update pwsh module version | |
shell: pwsh | |
working-directory: SnowflakePS | |
env: | |
gitVersion_assemblyVersion: ${{ steps.gitversion_step.outputs.AssemblySemVer }} | |
run: ../Scripts/SetModuleVersion.ps1 | |
- name: dotnet test | |
run: dotnet test sfsnowsightextensions.sln --results-directory "./TestResults" | |
- name: Publish Test Results | |
uses: EnricoMi/publish-unit-test-result-action/macos@v2 | |
if: always() | |
with: | |
files: | | |
TestResults/**/*.trx | |
- name: Dotnet Publish All | |
shell: pwsh | |
working-directory: SnowflakePS | |
run: ../Scripts/PublishAll.ps1 |