Skip to content

Commit

Permalink
Populate RepositoryBranch when building
Browse files Browse the repository at this point in the history
Fixes #2
  • Loading branch information
kzu committed Dec 17, 2020
1 parent 02bfa0e commit e6a51e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ jobs:
dotnet-version: 2.1.x

- name: πŸ™ build
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
run: dotnet build -m:1 -bl:build.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}

- name: πŸ§ͺ test
run: dotnet test --no-build -m:1 --blame-hang --blame-hang-timeout 5m -d $GITHUB_WORKSPACE/logs/${{ matrix.os }}.txt -r $GITHUB_WORKSPACE/logs

- name: πŸ“¦ pack
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER"
run: dotnet pack -m:1 -bl:pack.binlog -p:VersionLabel="$GITHUB_REF.$GITHUB_RUN_NUMBER" -p:RepositoryBranch=${GITHUB_REF#refs/*/}

- name: πŸ”Ό logs
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,19 @@ jobs:
dotnet-version: 2.1.x

- name: πŸ™ build
run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v}
run: dotnet build -m:1 -bl:build.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}

- name: πŸ§ͺ test
run: dotnet test --no-build -m:1

- name: πŸ“¦ pack
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v}
run: dotnet pack -m:1 -bl:pack.binlog -p:version=${GITHUB_REF#refs/*/v} -p:RepositoryBranch=${GITHUB_REF#refs/*/}

- name: πŸ”Ό logs
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
path: '*.binlog'
path: '**/*.binlog'

- name: πŸš€ nuget
run: dotnet nuget push ./bin/**/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_API_KEY}} --skip-duplicate

0 comments on commit e6a51e4

Please sign in to comment.