Skip to content

Update build.yml

Update build.yml #5

Workflow file for this run

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: 6.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