From 03df45003ea9cdfab294f6b9582bfe288ec8ad68 Mon Sep 17 00:00:00 2001 From: Miha Kralj Date: Sun, 7 Dec 2025 20:26:19 -0800 Subject: [PATCH] chore: Enhance Snyk scan and GitVersion regex for improved branch handling --- .github/workflows/Publish.yml | 11 +++++++---- GitVersion.yml | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/Publish.yml b/.github/workflows/Publish.yml index 6a3ac50c..a3077cfd 100644 --- a/.github/workflows/Publish.yml +++ b/.github/workflows/Publish.yml @@ -264,11 +264,14 @@ jobs: - name: Install Snyk CLI uses: snyk/actions/setup@master + - name: Restore dependencies + run: dotnet restore + - name: Run Snyk on Solution continue-on-error: true env: SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} - run: snyk test --file=QuanTAlib.sln + run: snyk test --all-projects # ============================================================================== # 7. CodeQL Analysis @@ -312,7 +315,7 @@ jobs: needs: [Build_Test_Coverage, Sonar_Analysis, Qodana_Scan, Codecov_Upload, Codacy_Upload, Snyk_Scan, CodeQL_Analysis] if: | success() && - (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev')) || + (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || endsWith(github.ref, '-dev'))) || github.event_name == 'workflow_dispatch' runs-on: ubuntu-latest steps: @@ -345,7 +348,7 @@ jobs: dotnet build ./quantower/Averages.csproj --configuration Release --nologo - name: Create Development Release - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/dev' || endsWith(github.ref, '-dev') env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -359,7 +362,7 @@ jobs: quantower/bin/Release/Averages.dll - name: Push to MyGet - if: github.ref == 'refs/heads/dev' + if: github.ref == 'refs/heads/dev' || endsWith(github.ref, '-dev') continue-on-error: true run: | dotnet nuget push 'lib/bin/Release/QuanTAlib.*.nupkg' \ diff --git a/GitVersion.yml b/GitVersion.yml index 171a6c3e..0f955e79 100644 --- a/GitVersion.yml +++ b/GitVersion.yml @@ -23,7 +23,7 @@ branches: increment: Patch track-merge-target: true track-merge-message: true - regex: ^dev(elop)?(ment)?$ + regex: ^dev(elop)?(ment)?$|.*-dev$ source-branches: - main pre-release-weight: 30000