-
Notifications
You must be signed in to change notification settings - Fork 873
Create winget-submission.yml #3729
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
packageFileName: coder_${VERSION}_windows_amd64.zip # Need to get VERSION from latest release to use here packageId: MyPackageIdInWinget # Need to ge an official Winget Package ID ecrets.Project_PAT # generate a PAT with the scope public_repo and add it to the secrets of your project with the name Project_PAT
Can you take a look at this? @bpmct |
Hey! Sorry for the late response - I'm looking at publishing the first package now so we can get the ID and then update via this action |
Sure, link it here when you are done. |
@matifali It seems like Winget very recently added support for portable apps (standalone .exe) and it's somewhat new and experimental. For example, I can't figure out how to create the app with Ah, I just saw this in the v1.3 release.
I also haven't been able to test with a local manifest. This does not seem to be working for me. Any ideas? # turn on install from file
winget settings --enable LocalManifestFiles
# install
winget install -m coder.yaml Id: Coder.Coder
Name: Coder
Description: Remote development environments on your infrastructure provisioned with Terraform
Version: 0.8.14
Publisher: Coder
License: AGPL-3.0, Unknown licenses found
Homepage: https://github.com/coder/coder
Tags: portable
Installers:
- Arch: x64
InstallerType: exe
Url: https://github.com/coder/coder/releases/download/v0.8.14/coder_0.8.14_windows_amd64.zip
Sha256: 435cc6a195c7af4a210d90ed78f59f802407caf6740986087f4e2ae983b7d3f8
|
By modifying the manifest file as per the latest singelton schema, although for community repo submission, we need three files schemas (wingetcreate will generate them automatically) PackageIdentifier: Coder.Coder
PackageVersion: 0.8.14
PackageLocale: en-US
Publisher: Coder
PackageName: Coder
License: AGPL-3.0, Unknown licenses found
ShortDescription: Remote development environments on your infrastructure provisioned with Terraform
Installers:
- Architecture: x64
InstallerType: portable
InstallerLocale: en-US
Commands: [coder]
InstallerUrl: https://github.com/coder/coder/releases/download/v0.8.14/coder_0.8.14_windows_amd64.zip
InstallerSha256: 435cc6a195c7af4a210d90ed78f59f802407caf6740986087f4e2ae983b7d3f8
InstallModes:
- silent
ManifestType: singleton
ManifestVersion: 1.2.0 I was able to install it locally and reached up to this point. PS C:\Users\matif> winget install -m coder.yaml
Found Coder [Coder.Coder] Version 0.8.14
This application is licensed to you by its owner.
Microsoft is not responsible for, nor does it grant any licenses to, third-party packages.
Downloading https://github.com/coder/coder/releases/download/v0.8.14/coder_0.8.14_windows_amd64.zip
██████████████████████████████ 112 MB / 112 MB
Successfully verified installer hash
Starting package install...
Overwriting existing file: C:\Users\matif\AppData\Local\Microsoft\WinGet\Links\coder_0.8.14_windows_amd64.exe
Successfully installed
PS C:\Users\matif> coder
ResourceUnavailable: Program 'coder.exe' failed to run: An error occurred trying to start process 'C:\Users\matif\AppData\Local\Microsoft\WinGet\Links\coder.exe' with working directory 'C:\Users\matif'. The specified executable is not a valid application for this OS platform.At line:1 char:1
+ coder
+ ~~~~~. |
There seems to be a known bug microsoft/winget-create#302 for why this is not working. |
Hmm ok. I will follow the issue there. It seems like this doesn't work with exe either, given that issue and the fact that it unzipped things fine |
How to we get past this? I ran into the same thing and it seems to be exclusive to winget |
Yes, it seems like it is installing it, and binary is on the path but can't execute. I will try to find the reason soon. It has to do something with 'App Execution Alias'. |
https://github.com/microsoft/winget-pkgs/tree/master/manifests/r/RussellBanks/winfetch/2.4.1 |
This Pull Request is becoming stale. In order to minimize WIP, prevent merge conflicts and keep the tracker readable, I'm going close to this PR in 3 days if there isn't more activity. |
Now that we have the installer this can be reopened and updated. The installer URL should be the asset URL from the release (e.g. |
env: | ||
version: "$(git describe --tags --abbrev=0)" | ||
packageFileName: coder_${version}_windows_amd64.zip | ||
packageId: Coder.Coder # Most probably the id of coder package |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These env vars should be in UPPER_SNAKE_CASE
format like normal env vars, and should be referenced by "$NAME"
in the script below instead of using ${env:NAME}
as they have different semantics
types: [published] | ||
|
||
env: | ||
version: "$(git describe --tags --abbrev=0)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency we should stick to ./scripts/version.sh
. Also, instead of having an evaluated statement here (which doesn't get evaluated instantly), you should just have these be variables in the script instead.
@@ -0,0 +1,23 @@ | |||
name: Submit package to Windows Package Manager Community Repository |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could just be called submit-packages.yml
and "Submit packages"
so we can use it for other package managers in the future
This PR adds a GitHub action to publish every release to winget
Subtasks
packageFileName: coder_${VERSION}_windows_amd64.zip
# Need to get VERSION from latest release to use herepackageId: MyPackageIdInWinget
# Need to ge an official Winget Package IDsecrets.Project_PAT
# generate aPAT
with the scope public_repo and add it to your project's secrets with the nameProject_PAT
.wingetcreate
issue with portable apps.Partially resolves #3714