Skip to content

Commit

Permalink
Reset Powershell environment
Browse files Browse the repository at this point in the history
We need to reset Powershell environment since it is inherited from the runner process.
For that, we use the chocolatey helper script that just needs to be imported.
We also make sure that JAVA_HOME is set properly to the one set up by the setup-java action.
  • Loading branch information
puskarpeter committed Apr 25, 2024
1 parent ffaa6b9 commit c6fb70f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/master-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,12 @@ jobs:
run: ./mvnw --no-transfer-progress verify
if: matrix.os != 'windows-latest'

- name: Build with maven on Windows
run: mvnw.cmd --no-transfer-progress verify
shell: cmd
- name: Build with maven
run: |
$step_java_home=$env:JAVA_HOME
Import-Module "$env:ChocolateyInstall/helpers/chocolateyInstaller.psm1"
refreshenv
$env:JAVA_HOME=$step_java_home
./mvnw --no-transfer-progress verify
shell: pwsh
if: matrix.os == 'windows-latest'

0 comments on commit c6fb70f

Please sign in to comment.