This repository was archived by the owner on Jan 14, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (44 loc) · 1.83 KB
/
release.yml
File metadata and controls
47 lines (44 loc) · 1.83 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
43
44
45
46
name: Release
on:
push:
tags:
- '*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.101
- name: Print openssl version
run: |
openssl version
- name: Decrypt signing key to use for strong-name
env:
SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }}
run: |
openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Test
run: dotnet test --no-restore --verbosity normal
- name: Set release version
run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10})
- name: Set assembly version to major semver
run: echo ::set-env name=ASSEMBLY_VERSION::$(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0
- name: Print assembly version
run: echo $ASSEMBLY_VERSION
- name: Pack nupkg
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digdir/packed
- name: Push ProxyKlient to NuGet
env:
NUGET_API_KEY: ${{ secrets.nugetApiKey }}
run: dotnet nuget push "digdir/packed/Difi.SikkerDigitalPost.ProxyKlient.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY
- name: Push Domene to NuGet
env:
NUGET_API_KEY: ${{ secrets.nugetApiKey }}
run: dotnet nuget push "digdir/packed/Difi.SikkerDigitalPost.ProxyKlient.Domene.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY