Skip to content

Commit

Permalink
Retreive Version from BuildProps
Browse files Browse the repository at this point in the history
Signed-off-by: Johannes Tuerk <[email protected]>
  • Loading branch information
Johannes Tuerk committed Dec 18, 2023
1 parent 49721aa commit 5329852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions .github/workflows/publish-nuget.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ env:
SOLUTION: 'src/Hyperledger.Aries.sln'
IS_PULL_REQUEST: ${{ github.event_name == 'pull_request' }}
IS_MAIN_BRANCH: ${{ github.ref == 'refs/heads/main' }}
MAJOR: '0'
MINOR: '1'
PATCH: '0'

jobs:
build:
Expand All @@ -27,12 +24,13 @@ jobs:

- name: Set Version
run: |
VERSION=$(xmllint --xpath "string(/Project/PropertyGroup/Version)" Directory.Build.props)
if $IS_MAIN_BRANCH; then
SUFFIX="-rc.{{ github.run_number }}"
elif $IS_PULL_REQUEST; then
SUFFIX="-pr.${{ github.event.pull_request.number }}.${{ github.run_number }}"
fi
echo "APP_VERSION=$MAJOR.$MINOR.$PATCH$SUFFIX" >> $GITHUB_ENV
echo "APP_VERSION=$VERSION$SUFFIX" >> $GITHUB_ENV
- name: Setup NuGet
uses: NuGet/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Product>Hyperledger Aries Dotnet</Product>
<RepositoryUrl>https://github.com/hyperledger/aries-framework-dotnet.git</RepositoryUrl>
<RepositoryType>git</RepositoryType>
<Version>1.6.4</Version>
<Version>2.0.0</Version>
</PropertyGroup>
<!-- Common compile parameters -->
<PropertyGroup>
Expand Down

0 comments on commit 5329852

Please sign in to comment.