-
-
Notifications
You must be signed in to change notification settings - Fork 2
42 lines (35 loc) · 1.14 KB
/
release-build.yml
File metadata and controls
42 lines (35 loc) · 1.14 KB
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
name: Release Build
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: ubuntu-latest
name: Build & Publish to NuGet
environment: nuget
env:
solution-path: './src/ICG AspnetCore Utilities.CloudStorage.sln'
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Ensure .NET Installed
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v4.3.2
with:
versionSpec: '6.4.0'
- name: Determine Version
id: gitversion
uses: gittools/actions/gitversion/execute@v4.3.2
- name: Restore Packages
run: dotnet restore "${{ env.solution-path }}"
- name: Build
run: dotnet build "${{ env.solution-path }}" --no-restore --configuration Release -p:version=${{ steps.gitversion.outputs.majorMinorPatch }}
- name: Test
run: dotnet test "${{ env.solution-path }}" --no-build --configuration Release
- name: Publish
run: dotnet nuget push **\*.nupkg -s 'https://api.nuget.org/v3/index.json' -k ${{secrets.ICG_NUGET_API_KEY}}