Skip to content

Releases: PSModule/Install-PowerShell

v1.0.2

14 Jun 22:08
7da1f59
Compare
Choose a tag to compare

🩹 [Patch]: Fix Windows PowerShell downgrade installation (#4)

This pull request refines the PowerShell installation process on Windows based GitHub runners.

  • Fixes #3

Windows-Specific Enhancements:

  • Added detection for currently installed PowerShell versions and introduced logic to handle downgrades, including uninstalling existing versions if necessary.
  • Improved uninstall command handling for MSI-based PowerShell installations by ensuring quiet and no-restart flags are added.

v1.0.1

26 Apr 13:15
0605bcb
Compare
Choose a tag to compare

🩹 [Patch]: Get package from GitHub release for Linux and macOS

This release updates the PowerShell installation process to streamline installation logic for different operating systems, using the GitHub releases on the PowerShell repository as source.

Improvements to installation logic

  • Linux installation process:
    • Replaced APT-specific logic with a more generic approach to support both Debian/Ubuntu and RHEL/Fedora/CentOS distributions. Added architecture detection to determine the appropriate package format (.deb or .rpm).
    • Enhanced error handling for unsupported Linux distributions.
  • macOS installation process:
    • Simplified version resolution logic for case-insensitive matching of the "latest" keyword.
    • Improved architecture detection and package download logic for macOS.
  • Windows installation process:
    • Added better logging for detected and requested versions. Improved error handling for download failures.

Enhancements to logging

  • Added logs to display the currently installed PowerShell version or indicate if it is not installed. This applies to all platforms (Linux, macOS, and Windows).
  • Included messages for successful installations and download URLs for better traceability.

Code consistency and maintainability

  • Introduced working-directory: ${{ github.action_path }} for all steps to ensure consistent execution paths.
  • Removed redundant or outdated logic, such as Homebrew-specific handling on macOS and APT-specific handling on Linux, in favor of a unified approach.

v1.0.0

21 Apr 11:02
09d87d3
Compare
Choose a tag to compare

Description

This pull request introduces the Install-PowerShell GitHub Action, simplifying installation of specific versions of PowerShell on GitHub runners.

Features:

  • Cross‑platform installer – Runs on all GitHub‑hosted runners (Ubuntu, macOS, Windows). Detects the OS at runtime and executes the appropriate installation routine.
  • Version selector – Installs either a specific PowerShell Core version (e.g. 7.4.1) or the latest stable release when Version: latest is supplied (default).
  • Smart skip logic – Checks the currently installed PowerShell version and skips installation when the requested version is already present, saving time and CI minutes.
  • Native package managers first
    • Linux (Debian/Ubuntu): Uses APT, falling back to direct .deb download if the exact version isn’t in the repo.
    • macOS: Prefers Homebrew Cask; falls back to the official .pkg installer (ARM64/x64 aware).
    • Windows: Downloads the official MSI and installs silently with msiexec.

Metadata Updates:

  • Action Metadata Update: Updated action.yml to reflect the new functionality, including a description, branding changes, and streamlined inputs. Removed unnecessary inputs like Debug and Verbose. action.yml

Type of change

  • 📖 [Docs]
  • 🪲 [Fix]
  • 🩹 [Patch]
  • ⚠️ [Security fix]
  • 🚀 [Feature]
  • 🌟 [Breaking change]

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas