@@ -15,13 +15,11 @@ jobs:
15
15
run : |
16
16
Invoke-WebRequest https://aka.ms/wingetcreate/latest -OutFile wingetcreate.exe
17
17
18
- # the package version is the same as the release tag without the leading
19
- # "v", and with a trailing ".0" (e.g. "v1.2.3" -> "1.2.3.0")
18
+ # The package version is the same as the tag minus the leading "v".
20
19
- name : Calculate package version
21
20
id : version
22
21
run : |
23
22
$version = $env:CODER_VERSION -replace "^v", ""
24
- $version += ".0"
25
23
echo "::set-output name=version::$version"
26
24
27
25
- name : Submit updated manifest to winget-pkgs
@@ -35,17 +33,30 @@ jobs:
35
33
36
34
echo "Installer URL: $installer_url"
37
35
36
+ # The URL "|X64" suffix forces the architecture as it cannot be
37
+ # sniffed properly from the URL. wingetcreate checks both the URL and
38
+ # binary magic bytes for the architecture and they need to both match,
39
+ # but they only check for `x64`, `win64` and `_64` in the URL. Our URL
40
+ # contains `amd64` which doesn't match sadly.
41
+ #
42
+ # wingetcreate will still do the binary magic bytes check, so if we
43
+ # accidentally change the architecture of the installer, it will fail
44
+ # submission.
38
45
.\wingetcreate.exe update Coder.Coder `
39
46
--submit `
40
47
--version "${{ steps.version.outputs.version }}" `
41
- --urls "$installer_url" `
48
+ --urls "${ installer_url}|X64 " `
42
49
--token "${{ secrets.CDRCI_GITHUB_TOKEN }}"
43
50
51
+ env :
52
+ # For gh CLI:
53
+ GH_TOKEN : ${{ github.token }}
54
+
44
55
- name : Comment on PR
45
56
run : |
46
57
# find the PR that wingetcreate just made
47
58
$pr_list = gh pr list --repo microsoft/winget-pkgs --search "author:cdrci Coder.Coder version ${{ steps.version.outputs.version }}" --limit 1 --json number | `
48
59
ConvertFrom-Json`
49
60
$pr_number = $pr_list[0].number
50
61
51
- gh pr comment --repo microsoft/winget-pkgs "$pr_number" --body "🤖 cc: @deansheather"
62
+ gh pr comment --repo microsoft/winget-pkgs "$pr_number" --body "🤖 cc: @deansheather @matifali "
0 commit comments