diff --git a/.github/workflows/Auto-Release.yml b/.github/workflows/Auto-Release.yml index ec157c9..680da5c 100644 --- a/.github/workflows/Auto-Release.yml +++ b/.github/workflows/Auto-Release.yml @@ -30,7 +30,5 @@ jobs: - name: Auto-Release uses: PSModule/Auto-Release@v1 - env: - GITHUB_TOKEN: ${{ github.token }} # Used for GitHub CLI authentication with: IncrementalPrerelease: false diff --git a/README.md b/README.md index ec0f2b9..e08a0b0 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ The Initialize-PSModule action will prepare the runner for the PSModule framewor | `Verbose` | Enable verbose output. | `false` | `'false'` | | `Version` | Specifies the version of the GitHub module to be installed. The value must be an exact version. | `false` | | | `Prerelease` | Allow prerelease versions if available. | `false` | `'false'` | +| `WorkingDirectory` | The working directory where the script runs. | `false` | `${{ github.workspace }}` | ## Example diff --git a/action.yml b/action.yml index 90d0485..aac4d86 100644 --- a/action.yml +++ b/action.yml @@ -21,6 +21,10 @@ inputs: description: Allow prerelease versions if available. required: false default: 'false' + WorkingDirectory: + description: The working directory where the script will run from. + required: false + default: ${{ github.workspace }} runs: using: composite @@ -32,6 +36,7 @@ runs: Prerelease: ${{ inputs.Prerelease }} Verbose: ${{ inputs.Verbose }} Version: ${{ inputs.Version }} + WorkingDirectory: ${{ inputs.WorkingDirectory }} Script: | # Initialize-PSModule - ${{ github.action_path }}\scripts\main.ps1 + ${{ github.action_path }}/scripts/main.ps1 diff --git a/scripts/main.ps1 b/scripts/main.ps1 index 86c70e9..80e7e51 100644 --- a/scripts/main.ps1 +++ b/scripts/main.ps1 @@ -36,12 +36,12 @@ $requiredModules.GetEnumerator() | Sort-Object | ForEach-Object { } } Write-Output "Installed module: [$name]" - Write-Output (Get-PSResource -Name $name | Select-Object * | Out-String) + Get-PSResource -Name $name | Select-Object * | Out-String Write-Output 'Module commands:' - Write-Output (Get-Command -Module $name | Out-String) + Get-Command -Module $name | Out-String } } -$requiredModules.Keys | Get-InstalledPSResource -Verbose:$false | Sort-Object -Property Name | - Format-Table -Property Name, Version, Prerelease, Repository -AutoSize -Wrap +Get-InstalledPSResource -Verbose:$false | Sort-Object -Property Name | + Format-Table -Property Name, Version, Prerelease, Repository -AutoSize | Out-String