Skip to content

Commit

Permalink
Update CI.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
TrevorPilley authored Dec 22, 2020
1 parent 591750c commit 1f17bf1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
NETCORE_VERSION: '5.0.101'
NUGET_SOURCE: 'https://api.nuget.org/v3/index.json'
PROJECT_CONFIGURATION: Release

PROJECT_PATH: ./src/PhoneNumbers/PhoneNumbers.csproj

jobs:
build:
Expand All @@ -39,3 +39,18 @@ jobs:

- name: dotnet test
run: dotnet test --no-restore --verbosity normal

- name: dotnet pack (pre-release)
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && github.ref == 'refs/heads/develop'
run: |
$date = Get-Date -Format "yyyyMMdd"
$projVersion = ([xml](Get-Content ${{ env.PROJECT_PATH }})) | Select-Xml -XPath "//Project/PropertyGroup[1]/Version"
dotnet pack --no-build --configuration ${{ env.PROJECT_CONFIGURATION }} -p:PackageVersion="$projVersion-preview$date.${{ github.run_id }}"
shell: pwsh

- name: dotnet pack
if: matrix.os == 'ubuntu-latest' && github.event_name == 'push' && github.ref == 'refs/heads/main'
run: |
$projVersion = ([xml](Get-Content ${{ env.PROJECT_PATH }})) | Select-Xml -XPath "//Project/PropertyGroup[1]/Version"
dotnet pack --no-build --configuration ${{ env.PROJECT_CONFIGURATION }} -p:PackageVersion="$projVersion"
shell: pwsh

0 comments on commit 1f17bf1

Please sign in to comment.