Skip to content

Commit

Permalink
#11 Special version number for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
iBrotNano committed Mar 3, 2023
1 parent 8e50ff8 commit 47bd787
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,12 @@ jobs:
dotnet-version: 7.0.x
- name: Restore dependencies
run: dotnet restore
- name: Generate package version
run: |
SLASH_CLEANED_VERSION_SUFFIX=${VERSION_SUFFIX/\//}
SHARP_CLEANED_VERSION_SUFFIX=${SLASH_CLEANED_VERSION_SUFFIX/\#/}
echo "PACKAGE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH-$SHARP_CLEANED_VERSION_SUFFIX-$VERSION_BUILD" >> $GITHUB_ENV
- name: Generate package version for regular builds
run: echo "PACKAGE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH-${VERSION_SUFFIX/\/#/}-$VERSION_BUILD" >> $GITHUB_ENV
if: github.event_name != 'pull_request'
- name: Generate package version for PRs
run: echo "PACKAGE_VERSION=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_PATCH-PR-$VERSION_BUILD" >> $GITHUB_ENV
if: github.event_name == 'pull_request'
- name: Generate assembly version
run: echo "ASSEMBLY_VERSION=$VERSION_MAJOR.0.0.0" >> $GITHUB_ENV
- name: Generate file version
Expand Down

0 comments on commit 47bd787

Please sign in to comment.