summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Letscher <dpletscher@outlook.com>2022-06-23 12:28:50 +0200
committerGitHub <noreply@github.com>2022-06-23 12:28:50 +0200
commitef52f9e77ec66f5189a18acfdce399882c37fdd8 (patch)
tree9e037aefbaba42d8a3baf2c302249dd5bdc62aa7
parent75475cd0c18f3265383505f3f5feabb4e792eb6f (diff)
feat(winget): Add support for winget package manager (#4042)
* Add winget update release step * Hardcode MSI URLs for wingetcreate * Fix variable expansion reference * Add winget install documentation * Revert removing MSI installer documentation Co-authored-by: Daniel Letscher <Letsch22@users.noreply.github.com>
-rw-r--r--.github/workflows/release.yml14
-rw-r--r--README.md2
2 files changed, 16 insertions, 0 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index e0cb4c211..c5aba823b 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -308,6 +308,20 @@ jobs:
env:
COMMITTER_TOKEN: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
+ winget_update:
+ name: Update Winget Manifest
+ runs-on: windows-latest
+ needs: [release_please, github_build, upload_artifacts]
+ if: ${{ needs.release_please.outputs.release_created == 'true' }}
+ env:
+ URL_64: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-x86_64-pc-windows-msvc.msi
+ URL_32: https://github.com/starship/starship/releases/download/${{ needs.release_please.outputs.tag_name }}/starship-i686-pc-windows-msvc.msi
+ steps:
+ - run: |
+ $version = '${{ needs.release_please.outputs.tag_name }}'.replace('v', '')
+ iwr https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
+ ./wingetcreate.exe update Starship.Starship -s -v $version -u $env:URL_64 $env:URL_32 -t ${{ secrets.GITHUB_TOKEN }}
+
merge_crowdin_pr:
name: Merge Crowdin PR
runs-on: ubuntu-latest
diff --git a/README.md b/README.md
index 9ac75d75b..2231f8b6a 100644
--- a/README.md
+++ b/README.md
@@ -261,6 +261,7 @@ Install Starship using any of the following package managers:
| [Chocolatey] | `choco install starship` |
| [conda-forge] | `conda install -c conda-forge starship` |
| [Scoop] | `scoop install starship` |
+| [winget] | `winget install --id Starship.Starship` |
</details>
@@ -447,3 +448,4 @@ This project is [ISC](https://github.com/starship/starship/blob/master/LICENSE)
[snapcraft]: https://snapcraft.io/starship
[termux]: https://github.com/termux/termux-packages/tree/master/packages/starship
[void linux packages]: https://github.com/void-linux/void-packages/tree/master/srcpkgs/starship
+[winget]: https://github.com/microsoft/winget-pkgs/tree/master/manifests/s/Starship/Starship