Skip to content

Setup PowerShell Toolkit

Actions
Setup PowerShell module hugoalh.GitHubActionsToolkit
v2.0.0
Latest
Star (3)

Tags

 (1)

Setup PowerShell Toolkit (GitHub Action)

⚖️ MIT CodeFactor Grade

Release - Latest Release - Pre
GitHub GitHub Latest Release Version (GitHub Latest Release Date) GitHub Latest Pre-Release Version (GitHub Latest Pre-Release Date)

A GitHub Action to setup PowerShell module hugoalh.GitHubActionsToolkit (GitHub)(PowerShell Gallery).

Important

This documentation is v2.0.0 based; To view other version's documentation, please visit the versions list and select the correct version.

🔰 Begin

GitHub Actions

  • Target Version: Runner >= v2.311.0, &:
    • PowerShell >= v7.2.0
  • Require Permission: N/A
jobs:
  job_id:
    runs-on: "________" # Any
    steps:
      - uses: "hugoalh-studio/setup-powershell-toolkit-ghaction@<Tag>"

🧩 Input

Note

All of the inputs are optional; Use this action without any input will default to install major equitant latest version of 2.1.0 for current user, and keep the setting that modified.

sudo

<Boolean = False> Whether to execute in sudo mode on non-Windows environment. This must set to True in order to able install for all users on non-Windows environment (i.e.: when input scope is "AllUsers").

version

<String = "^2.1.0"> Target version, by Semantic Versioning (SemVer) 2.0.0 with optional modifier; Default to major equitant latest version of 2.1.0.

  • "Latest": Latest version
  • "<1.2.3": Less than this version
  • "<=1.2.3": Less than or equal to this version
  • "1.2.3" / "=1.2.3": Equal to this version
  • ">=1.2.3": Greater than or equal to this version
  • ">1.2.3": Greater than this version
  • "^1.2.3": Between this version and major equitant latest version
  • "~1.2.3": Between this version and minor equitant latest version

allowprerelease

<Boolean = False> Whether to allow target pre release version.

scope

<String = "CurrentUser"> Installation scope.

  • "AllUsers": For all users. Also need to set input sudo to True on non-Windows environment.
  • "CurrentUser": For current user.

force

<Boolean = False> Whether to force install or reinstall target (pre release) version.

keepsetting

<Boolean = False> Whether to keep the setting that modified.

🧩 Output

path

<String> Path of the installation.

version

<SemVer> Version of the installation.

✍️ Example

  • jobs:
      job_id:
        name: "Hello World"
        runs-on: "ubuntu-latest"
        steps:
          - name: "Setup PowerShell Toolkit"
            uses: "hugoalh-studio/setup-powershell-toolkit-ghaction@v2.0.0"
          - run: |
              Import-Module -Name 'hugoalh.GitHubActionsToolkit' -Scope 'Local'
              Write-GitHubActionsNotice -Message 'Hello, world!'
            shell: "pwsh"

📚 Guide

Setup PowerShell Toolkit is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Setup PowerShell module hugoalh.GitHubActionsToolkit
v2.0.0
Latest

Tags

 (1)

Setup PowerShell Toolkit is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.