Skip to content

Commit

Permalink
ci: add manual dispatch and logging
Browse files Browse the repository at this point in the history
  • Loading branch information
piksel committed Sep 19, 2021
1 parent 641f292 commit a1423c4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build and Test

on:
workflow_dispatch:
pull_request:
branches: [ master ]
push:
Expand Down Expand Up @@ -138,6 +139,16 @@ jobs:
if: ${{ github.event_name == 'pull_request' }}
run: echo "PKG_SUFFIX=-PR" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

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

Expand Down

0 comments on commit a1423c4

Please sign in to comment.