-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 981 Bytes
/
release.yaml
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
name: Build and release
on:
push:
tags:
- v*
jobs:
build:
name: Build and release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 9
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.*
- name: Restore dotnet
run: dotnet restore
- name: Build dotnet
run: dotnet build --no-restore
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
sep-tags: ";"
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
- name: Pack .NET project
run: dotnet pack Intility.Logging.sln -o Intility.Logging/output --property:Version=${{ steps.meta.outputs.tags }}
- name: Publish to NuGet
run: dotnet nuget push Intility.Logging/output/*.nupkg --skip-duplicate --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json