Skip to content

Commit

Permalink
Updated to run on feature and bugfix branches.
Browse files Browse the repository at this point in the history
  • Loading branch information
aheintz committed Aug 20, 2024
1 parent 7c99008 commit e59b136
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: .NET

on:
push:
branches: [ "main", "release/*" ]
branches: [ "main", "release/*", "feature/*" "bugfix/*"]
pull_request:
branches: [ "main" ]

Expand All @@ -24,8 +24,17 @@ jobs:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore
- name: Extract branch name if release
if: startsWith(github.ref, 'refs/heads/release')
shell: bash
run: echo "BRANCH=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/release/}}" >> $GITHUB_ENV
- name: Extract branch name if not release
if: !startsWith(github.ref, 'refs/heads/release')
shell: bash
run: echo "BRANCH=0.0.1" >> $GITHUB_ENV
id: extract_branch_version
- name: Build
run: dotnet build --no-restore
run: dotnet build --no-restore -c Release /property:Version=${{ env.BRANCH }}
- name: Test
run: dotnet test --no-build --verbosity normal --filter "TestCategory!=Integration"
- name: Publish
Expand Down

0 comments on commit e59b136

Please sign in to comment.