Skip to content

Commit eb8d5b4

Browse files
authored
fix(ci): fix winget package submission (#5630)
* fix(ci): fix winget package submission I removed the step to calculate the version, as somehow the $version was not populated with the version. Also, GitHub actions suggest removing `:set-output:` as it is deprecated. This commit should probably fix the winget package submission using `wingetcreate` cli. * fixed a typo
1 parent aec1590 commit eb8d5b4

File tree

1 file changed

+7
-9
lines changed

1 file changed

+7
-9
lines changed

.github/workflows/packages.yaml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,22 @@ jobs:
1515
run: |
1616
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
1717
18-
# The package version is the same as the tag minus the leading "v".
19-
- name: Calculate package version
20-
id: version
21-
run: |
22-
$version = $env:CODER_VERSION -replace "^v", ""
23-
echo "::set-output name=version::$version"
24-
2518
- name: Submit updated manifest to winget-pkgs
2619
run: |
2720
$release_assets = gh release view --repo coder/coder "$env:CODER_VERSION" --json assets | `
2821
ConvertFrom-Json
29-
22+
# Get the installer URL from the release assets.
3023
$installer_url = $release_assets.assets | `
3124
Where-Object name -Match ".*_windows_amd64_installer.exe$" | `
3225
Select -ExpandProperty url
3326
3427
echo "Installer URL: $installer_url"
3528
29+
# The package version is the same as the tag minus the leading "v".
30+
$version = $env:CODER_VERSION -replace "^v", ""
31+
32+
echo "Package version: $version"
33+
3634
# The URL "|X64" suffix forces the architecture as it cannot be
3735
# sniffed properly from the URL. wingetcreate checks both the URL and
3836
# binary magic bytes for the architecture and they need to both match,
@@ -44,7 +42,7 @@ jobs:
4442
# submission.
4543
.\wingetcreate.exe update Coder.Coder `
4644
--submit `
47-
--version "${{ steps.version.outputs.version }}" `
45+
--version "${version}" `
4846
--urls "${installer_url}|X64" `
4947
--token "${{ secrets.CDRCI_GITHUB_TOKEN }}"
5048

0 commit comments

Comments
 (0)