Merge pull request #232 from digipost/dependabot/bundler/docs/rexml-3… #31
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 8.x | |
- 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 environment variable | |
run: echo "RELEASE_VERSION=$(echo ${GITHUB_REF:10})" >> $GITHUB_ENV | |
- name: Set ASSEMBLY_VERSION environment variable | |
run: echo "ASSEMBLY_VERSION=$(echo $(echo ${GITHUB_REF:10} | cut -d '.' -f 1).0.0)" >> $GITHUB_ENV | |
- name: Print relese version | |
run: echo $RELEASE_VERSION | |
- 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 digipost/packed Digipost.Api.Client | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Common | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Docs | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Inbox | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Archive | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Resources | |
- name: Pack nupkg | |
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Send | |
- name: Push Client to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Common to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Docs to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Inbox to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Archive to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Resources to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 | |
- name: Push Send to NuGet | |
env: | |
NUGET_API_KEY: ${{ secrets.nugetApiKey }} | |
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 |