Skip to content

Commit

Permalink
Merge pull request #23 from digipost/set-assembly-version-on-release
Browse files Browse the repository at this point in the history
Set assembly version to  '<major>.0.0' when releasing new version.
  • Loading branch information
johnksv authored Jun 10, 2020
2 parents a1f4cfe + 9a9ddd6 commit 9ab89c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,12 @@ jobs:
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 --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Shared
run: dotnet pack -p:PackageVersion=$RELEASE_VERSION -p:AssemblyVersion=$ASSEMBLY_VERSION --configuration Release --no-build --output digipost/packed Digipost.Api.Client.Shared
- name: Push to NuGet
env:
NUGET_API_KEY: ${{ secrets.nugetApiKey }}
Expand Down

0 comments on commit 9ab89c0

Please sign in to comment.