Skip to content

🩹 [Patch]: Add try/finally blocks #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Feb 22, 2025
13 changes: 9 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,12 @@ runs:
GITHUB_ACTION_INPUT_Prerelease: ${{ inputs.Prerelease }}
run: |
# GitHub-Script
. ${{ github.action_path }}\scripts\init.ps1
. ${{ github.action_path }}\scripts\info.ps1
${{ inputs.Script }}
. ${{ github.action_path }}\scripts\outputs.ps1
try {
${{ github.action_path }}/scripts/init.ps1
${{ github.action_path }}/scripts/info.ps1
${{ inputs.Script }}
${{ github.action_path }}/scripts/outputs.ps1
}
finally {
${{ github.action_path }}/scripts/clean.ps1
}
5 changes: 5 additions & 0 deletions scripts/clean.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Write-Debug "Cleaning up..."
Write-Debug "LASTEXITCODE: $LASTEXITCODE"
Write-Debug "PSMODULE_GITHUB_SCRIPT: $env:PSMODULE_GITHUB_SCRIPT"
$env:PSMODULE_GITHUB_SCRIPT = $false
Write-Debug "PSMODULE_GITHUB_SCRIPT: $env:PSMODULE_GITHUB_SCRIPT"