Skip to content

Action to install latest winget CLI on Windows runners

License

Notifications You must be signed in to change notification settings

Cyberboss/install-winget

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

install-winget

Action to install latest winget-cli on Windows runners

Currently only supports windows-2022/window-latest runner image.

Usage

    - name: Install winget
      uses: Cyberboss/install-winget@v1

Example

.github/workflows/test-job.yml

jobs:
  test-job:
    name: Test Job
    runs-on: windows-latest
    steps:
    - name: Install winget
      uses: Cyberboss/install-winget@v1
      with:
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    - name: Install wingetcreate
      run: winget install wingetcreate --disable-interactivity --accept-source-agreements

Inputs

GITHUB_TOKEN (Optional)

The GitHub token to use when interacting with the GitHub API. Used to bypass unauthenticated rate limits.

Recommendation is to set this to ${{ secrets.GITHUB_TOKEN }} or some other available token as GitHub runners tend to often come with exhausted rate limits.

Outputs

winget-version

The output of winget --version for the installed version.

    - uses: Cyberboss/install-winget@v1
      id: stepid

    - run: echo '${{ steps.stepid.outputs.winget-version }}' # i.e. v1.6.1573-preview