-
Notifications
You must be signed in to change notification settings - Fork 3
50 lines (40 loc) · 1.21 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Build and Pack Only
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Get next version
uses: NikRimington/version-increment@NikRimington-windows
id: version
with:
scheme: semver
increment: patch
release_branch: main
- name: Set Version Variable
env:
TAG: ${{ steps.version.outputs.version }}
run: echo "VERSION=${TAG#v}" >> $GITHUB_ENV
- name: Setup .NET 6
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Setup .NET 7
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Setup .NET 8
uses: actions/setup-dotnet@v2
with:
dotnet-version: 8.0.x
- name: Build project
run: dotnet build src\HC.PageNotFoundManager\HC.PageNotFoundManager.csproj --configuration Release /p:Version=$VERSION
- name: Pack project
run: dotnet pack --output nupkgs /p:PackageVersion=$VERSION .\src\PageNotFoundManager.sln