|
1 | 1 | name: Release |
2 | 2 |
|
3 | | -on: |
| 3 | +on: |
4 | 4 | push: |
5 | 5 | tags: |
6 | 6 | - '*' |
|
9 | 9 | release: |
10 | 10 | runs-on: ubuntu-latest |
11 | 11 | steps: |
12 | | - - uses: actions/checkout@v2 |
13 | | - - name: Setup .NET Core |
14 | | - uses: actions/setup-dotnet@v1 |
15 | | - with: |
16 | | - dotnet-version: 3.1.101 |
17 | | - - name: Print openssl version |
18 | | - run: | |
19 | | - openssl version |
20 | | - - name: Decrypt signing key to use for strong-name |
21 | | - env: |
22 | | - SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }} |
23 | | - run: | |
24 | | - openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d |
25 | | - - name: Install dependencies |
26 | | - run: dotnet restore |
27 | | - - name: Build |
28 | | - run: dotnet build --configuration Release --no-restore |
29 | | - - name: Test |
30 | | - run: dotnet test --no-restore --verbosity normal |
31 | | - - name: Set release version |
32 | | - run: echo ::set-env name=RELEASE_VERSION::$(echo ${GITHUB_REF:10}) |
33 | | - - name: Set assembly version to major semver |
34 | | - run: echo ::set-env name=ASSEMBLY_VERSION::$(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0 |
35 | | - - name: Print assembly version |
36 | | - run: echo $ASSEMBLY_VERSION |
37 | | - - name: Pack nupkg |
38 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client |
39 | | - - name: Pack nupkg |
40 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Common |
41 | | - - name: Pack nupkg |
42 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Docs |
43 | | - - name: Pack nupkg |
44 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Inbox |
45 | | - - name: Pack nupkg |
46 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Resources |
47 | | - - name: Pack nupkg |
48 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Scripts |
49 | | - - name: Pack nupkg |
50 | | - run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Send |
51 | | - - name: Push Client to NuGet |
52 | | - env: |
53 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
54 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
55 | | - - name: Push Common to NuGet |
56 | | - env: |
57 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
58 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Common.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
59 | | - - name: Push Docs to NuGet |
60 | | - env: |
61 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
62 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Docs.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
63 | | - - name: Push Inbox to NuGet |
64 | | - env: |
65 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
66 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Inbox.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
67 | | - - name: Push Resources to NuGet |
68 | | - env: |
69 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
70 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Resources.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
71 | | - - name: Push Scripts to NuGet |
72 | | - env: |
73 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
74 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Scripts.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
75 | | - - name: Push Send to NuGet |
76 | | - env: |
77 | | - NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
78 | | - run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Send.$RELEASE_VERSION.nupkg" --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 12 | + - uses: actions/checkout@v2 |
| 13 | + - name: Setup .NET Core |
| 14 | + uses: actions/setup-dotnet@v1 |
| 15 | + with: |
| 16 | + dotnet-version: 3.1.101 |
| 17 | + - name: Print openssl version |
| 18 | + run: | |
| 19 | + openssl version |
| 20 | + - name: Decrypt signing key to use for strong-name |
| 21 | + env: |
| 22 | + SIGNINGKEY_ENC_PASSWORD: ${{ secrets.signingkeyEncPassword }} |
| 23 | + run: | |
| 24 | + openssl aes-256-cbc -salt -pbkdf2 -k "$SIGNINGKEY_ENC_PASSWORD" -in signingkey.snk.enc -out signingkey.snk -d |
| 25 | + - name: Install dependencies |
| 26 | + run: dotnet restore |
| 27 | + - name: Build |
| 28 | + run: dotnet build --configuration Release --no-restore |
| 29 | + - name: Test |
| 30 | + run: dotnet test --no-restore --verbosity normal |
| 31 | + - name: Set RELEASE_VERSION environment variable |
| 32 | + run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV |
| 33 | + - name: Set ASSEMBLY_VERSION environment variable |
| 34 | + run: echo "ASSEMBLY_VERSION=$(echo $(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0)" >> $GITHUB_ENV |
| 35 | + - name: Print relese version |
| 36 | + run: echo $RELEASE_VERSION |
| 37 | + - name: Print assembly version |
| 38 | + run: echo $ASSEMBLY_VERSION |
| 39 | + - name: Pack nupkg |
| 40 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client |
| 41 | + - name: Pack nupkg |
| 42 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Common |
| 43 | + - name: Pack nupkg |
| 44 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Docs |
| 45 | + - name: Pack nupkg |
| 46 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Inbox |
| 47 | + - name: Pack nupkg |
| 48 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Archive |
| 49 | + - name: Pack nupkg |
| 50 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Resources |
| 51 | + - name: Pack nupkg |
| 52 | + run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Send |
| 53 | + - name: Push Client to NuGet |
| 54 | + env: |
| 55 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 56 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 57 | + - name: Push Common to NuGet |
| 58 | + env: |
| 59 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 60 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Common.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 61 | + - name: Push Docs to NuGet |
| 62 | + env: |
| 63 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 64 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Docs.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 65 | + - name: Push Inbox to NuGet |
| 66 | + env: |
| 67 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 68 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Inbox.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 69 | + - name: Push Archive to NuGet |
| 70 | + env: |
| 71 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 72 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Archive.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 73 | + - name: Push Resources to NuGet |
| 74 | + env: |
| 75 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 76 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Resources.$RELEASE_VERSION.nupkg" --skip-duplicate --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
| 77 | + - name: Push Send to NuGet |
| 78 | + env: |
| 79 | + NUGET_API_KEY: ${{ secrets.nugetApiKey }} |
| 80 | + run: dotnet nuget push "digipost/packed/Digipost.Api.Client.Send.$RELEASE_VERSION.nupkg" --source https://api.nuget.org/v3/index.json --api-key $NUGET_API_KEY |
0 commit comments