Skip to content

Commit

Permalink
ci: Further specified CI and release workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed May 28, 2024
1 parent eaf0c03 commit 8842741
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: .NET Build

on:
pull_request:
branches: ["main"]
branches:
- "*"

jobs:
build-and-publish:
Expand All @@ -11,6 +12,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup .NET
uses: actions/setup-dotnet@v4
Expand All @@ -21,16 +24,28 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}

- name: Format
run: ./build.ps1 format
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}

- name: Restore
run: ./build.ps1 restore
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: "5.x"

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
- name: Determine Version
id: version
uses: gittools/actions/gitversion/[email protected]

- name: 🗄️ Format
run: ./build.ps1 format

- name: ♻️ Restore
run: ./build.ps1 restore

- name: ⚒️ Build
run: ./build.ps1 build
env:
VERSION: ${{ env.fullSemVer }}
FILE_VERSION: ${{ env.assemblySemFileVer }}
6 changes: 2 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: .NET Build and Publish

on:
push:
branches: ["main", "dev", "dui3/alpha"]
pull_request:
branches:
- dui3/alpha
branches: ["main", "dev", "dui3/alpha", "dui3/ci/*"]
tags: ["3.*"]

jobs:
build-and-publish:
Expand Down

0 comments on commit 8842741

Please sign in to comment.