Skip to content

fix(ci): fix winget package submission #5630

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 2 commits into from
Jan 9, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
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.
  • Loading branch information
matifali authored Jan 9, 2023
commit d5129cdf656802a1633c74213594f5d530ec1bef
14 changes: 6 additions & 8 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,6 @@ jobs:
run: |
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe

# The package version is the same as the tag minus the leading "v".
- name: Calculate package version
id: version
run: |
$version = $env:CODER_VERSION -replace "^v", ""
echo "::set-output name=version::$version"

- name: Submit updated manifest to winget-pkgs
run: |
$release_assets = gh release view --repo coder/coder "$env:CODER_VERSION" --json assets | `
Expand All @@ -33,6 +26,11 @@ jobs:

echo "Installer URL: $installer_url"

# The package version is the same as the tag minus the leading "v".
$version = $env:CODER_VERSION -replace "^v", ""

echo "Package vesion: $version"

# The URL "|X64" suffix forces the architecture as it cannot be
# sniffed properly from the URL. wingetcreate checks both the URL and
# binary magic bytes for the architecture and they need to both match,
Expand All @@ -44,7 +42,7 @@ jobs:
# submission.
.\wingetcreate.exe update Coder.Coder `
--submit `
--version "${{ steps.version.outputs.version }}" `
--version "${version}" `
--urls "${installer_url}|X64" `
--token "${{ secrets.CDRCI_GITHUB_TOKEN }}"

Expand Down