Skip to content

Commit

Permalink
Fix GH actions usage of env/path commands
Browse files Browse the repository at this point in the history
  • Loading branch information
kzu committed Nov 19, 2020
1 parent 2754678 commit 6db00a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: set version
run: echo "::set-env name=VERSION_SUFFIX::$(git name-rev --name-only --refs=refs/heads/* HEAD).$($env:GITHUB_RUN_NUMBER)"
run: echo "VERSION_SUFFIX=$(git name-rev --name-only --refs=refs/heads/* HEAD).$($env:GITHUB_RUN_NUMBER)" >> $GITHUB_ENV
- uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.100-rc.1.20452.10
Expand All @@ -22,10 +22,10 @@ jobs:
with:
dotnet-version: 3.1.x
- run: dotnet tool update -g dotnet-vs
- run: echo "::set-env name=MSB::$(vs where preview --prop=InstallationPath)"
- run: echo "MSB=$(vs where preview --prop=InstallationPath)" >> $GITHUB_ENV
- run: vs install preview --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools
if: env.MSB == ''
- run: echo "::add-path::$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin"
- run: echo "$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" >> $GITHUB_PATH
- name: build
run: msbuild -r -p:versionsuffix=$($env:VERSION_SUFFIX)
- name: test
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: set version
run: echo "::set-env name=VERSION::${GITHUB_REF#refs/*/v}"
run: echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
shell: bash
- uses: actions/setup-dotnet@v1
with:
Expand All @@ -26,10 +26,10 @@ jobs:
with:
dotnet-version: 3.1.x
- run: dotnet tool update -g dotnet-vs
- run: echo "::set-env name=MSB::$(vs where preview --prop=InstallationPath)"
- run: echo "MSB=$(vs where preview --prop=InstallationPath)" >> $GITHUB_ENV
- run: vs install preview --quiet +Microsoft.VisualStudio.Component.ManagedDesktop.Core +Microsoft.NetCore.Component.DevelopmentTools
if: env.MSB == ''
- run: echo "::add-path::$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin"
- run: echo "$(vs where preview --prop=InstallationPath)\MSBuild\Current\Bin" >> $GITHUB_PATH
- name: build
run: msbuild -r -p:version=$($env:VERSION)
- name: test
Expand Down

0 comments on commit 6db00a6

Please sign in to comment.