WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
16 stars 3 forks source link

GITHUB_SHA not set correctly in NuGet package #138

Closed yaakov-h closed 3 years ago

yaakov-h commented 3 years ago

<repository type="git" url="https://github.com/WiseTechGlobal/WTG.Analyzers" commit="%GITHUB_SHA%" />

brian-reichle commented 3 years ago

I'm guessing it's because this is not the correct way to get the commit SHA in github actions.

dotnet pack --configuration ${{ matrix.configuration }} --no-build -p:CommitID=%GITHUB_SHA%

brian-reichle commented 3 years ago

Seems like maybe it should be $GITHUB_SHA or ${GITHUB_SHA}.

yaakov-h commented 3 years ago

I would expect $GITHUB_SHA/${GITHUB_SHA} on macOS/ubuntu builds and %GITHUB_SHA% on the Windows builds... unless it's being run through PowerShell in which case it would be ${env:GITHUB_SHA}?

It'll be the same here too...

It looks like we can access it via Actions variables rather than environment variables, I'll test that now.