Skip to content

Commit a1423c4

Browse files
authored
ci: add manual dispatch and logging
1 parent 641f292 commit a1423c4

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/build-test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: Build and Test
22

33
on:
4+
workflow_dispatch:
45
pull_request:
56
branches: [ master ]
67
push:
@@ -138,6 +139,16 @@ jobs:
138139
if: ${{ github.event_name == 'pull_request' }}
139140
run: echo "PKG_SUFFIX=-PR" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
140141

142+
# NOTE: Should be used in next step as well, but only used for debugging for now
143+
- name: Set package version
144+
run: >-
145+
$PKG_GIT_VERSION="$(git describe --abbrev | % { $_.substring(1) })"
146+
Write-Output "Git describe: $PKG_GIT_VERSION"
147+
Write-Output "Package suffix: $env:PKG_SUFFIX"
148+
$PKG_VERSION = "${PKG_GIT_VERSION}${env:PKG_SUFFIX}"
149+
Write-Output "Package version: $PKG_VERSION"
150+
Write-Output "PKG_VERSION=$PKG_VERSION" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
151+
141152
- name: Create nuget package
142153
run: dotnet pack ${{ env.PKG_PROJ }} -c Release --output dist ${{ env.PKG_PROPS }} /p:Version=$(git describe --abbrev | % { $_.substring(1) })${{ env.PKG_SUFFIX }}
143154

0 commit comments

Comments
 (0)