Skip to content

fix(ci): fix winget installer workflow #5569

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

Merged
merged 4 commits into from
Jan 5, 2023
Merged

fix(ci): fix winget installer workflow #5569

merged 4 commits into from
Jan 5, 2023

Conversation

matifali
Copy link
Member

@matifali matifali commented Jan 4, 2023

fix: winget automatic release

  • Add GH_TOKEN environment variable (Needed for gh cli to work inside GitHub actions)
  • Rename windows installer to replace amd64 with win64

wingetcreate specifically checks for "x64, win64 or _64 strings in the installer URL to decide on application architecture.
Source: (got the idea from here microsoft/winget-create#198)
https://github.com/microsoft/winget-create/blob/7c61f3e877f95f6c8ab60ed4e3a34d9449d7e774/src/WingetCreateCore/Common/PackageParser.cs#L466

other wise we get this error,

Retrieving latest manifest for Coder.Coder
Downloading and parsing: https://github.com/coder/coder/releases/download/v0.13.6/coder_0.13.6_windows_amd64_installer.exe...
Each new installer URL must have a single match to an existing installer based on installer type and architecture. The following installers failed to match an existing installer:
Multiple matches found for X64 Nullsoft installer detected from the url: https://github.com/coder/coder/releases/download/v0.13.6/coder_0.13.6_windows_amd64_installer.exe

This PR closes #5266 and #5137

```yaml
env:
          GH_TOKEN: ${{ github.token }}
```
Needed for gh cli to work inside github actions

We do not need that last 0 to match the version with other platforms
@matifali
Copy link
Member Author

matifali commented Jan 4, 2023

cc: @deansheather @kylecarbs @ghuntley

@deansheather deansheather self-requested a review January 4, 2023 14:38
@deansheather deansheather changed the title fix(ci): add GH_TOKEN env fix(ci): fix winget installer workflow Jan 5, 2023
@deansheather deansheather enabled auto-merge (squash) January 5, 2023 04:51
@deansheather
Copy link
Member

I reverted the filename back as we can force wingetcreate to accept our filename by adding |X64 to the end of the URL.

@deansheather
Copy link
Member

I also submitted a new version manually as the architecture was incorrect on winget-pkgs which would cause any unattended updates to fail. From now on it should work hopefully 🤞

@deansheather deansheather merged commit 0124289 into coder:main Jan 5, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jan 5, 2023
@matifali matifali deleted the patch-3 branch January 5, 2023 11:44
@bpmct
Copy link
Member

bpmct commented Jan 9, 2023

@matifali

Seems like it's still not working :(

https://github.com/coder/coder/actions/runs/3875913715/jobs/6609100482

@deansheather
Copy link
Member

The --version flag seems to be set to "" even though it should be ${version}. I guess github is replacing that early or something before running it in powershell. We could try changing it to "$version" instead perhaps

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Packages.yaml github action fails
3 participants