-
Notifications
You must be signed in to change notification settings - Fork 3
66 lines (64 loc) · 3.64 KB
/
release.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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.403
- name: Set release version
run: echo "RELEASE_VERSION=${GITHUB_REF:10}" >> $GITHUB_ENV
- name: Set assembly version to major semver
run: echo "ASSEMBLY_VERSION=$(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0" >> $GITHUB_ENV
- name: Print assembly version
run: echo $ASSEMBLY_VERSION
- name: Sed InformationalVersion number for build purposes
run: sed -i -e "s|0.0.0.0<\/Version>|$RELEASE_VERSION<\/Version>|g" Directory.Build.props
- name: Sed AssemblyVersion number for build purposes
run: sed -i -e "s|0.0.0.0<\/AssemblyVersion>>|$RELEASE_VERSION<\/AssemblyVersion>>|g" Directory.Build.props
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Core
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Archive
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Direct
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Portal
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Resources
- name: Pack nupkg
run: dotnet pack --configuration Release --no-build --output digipost/packed Digipost.Signature.Api.Client.Scripts
- name: Push Client to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Core.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Common to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Archive.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Docs to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Direct.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Inbox to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Portal.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Resources to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Resources.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Scripts to NuGet
env:
NUGET_API_KEY: ${{ secrets.NUGETAPIKEY }}
run: dotnet nuget push "digipost/packed/Digipost.Signature.Api.Client.Scripts.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY